Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate all structs in structs packages #4220

Merged
merged 4 commits into from
Apr 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ BUG FIXES:
[[GH-4216](https://github.com/hashicorp/nomad/issues/4216)]
* core: Improve tracking of node connections even if the address being used to
contact the server changes [[GH-4222](https://github.com/hashicorp/nomad/issues/4222)]
* api: Fix an issue in which the autopilot configuration could not be updated
[GH-4220]
* client: Populate access time and modify time when unarchiving tar archives
that do not specify them explicitly [[GH-4217](https://github.com/hashicorp/nomad/issues/4217)]
* driver/exec: Create process group for Windows process and send Ctrl-Break
Expand Down
3 changes: 3 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ clean: ## Remove build artifacts

.PHONY: travis
travis: ## Run Nomad test suites with output to prevent timeouts under Travis CI
@if [ ! $(SKIP_NOMAD_TESTS) ]; then \
make generate; \
fi
@sh -C "$(PROJECT_ROOT)/scripts/travis.sh"

.PHONY: testcluster
Expand Down
5 changes: 5 additions & 0 deletions nomad/structs/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

FILES="$(ls *[!_test].go | tr '\n' ' ')"
codecgen -d 100 -o structs.generated.go ${FILES}
2 changes: 1 addition & 1 deletion nomad/structs/structs_codegen.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package structs

//go:generate codecgen -d 100 -o structs.generated.go structs.go
//go:generate ./generate.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't there be a similar change to the directive in client/structs/structs.go