diff --git a/GNUmakefile b/GNUmakefile index 8475ffbd6..849f7c138 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,7 +6,7 @@ GIT_COMMIT := $(shell git rev-parse HEAD) GIT_DIRTY := $(if $(shell git status --porcelain),+CHANGES) GO_LDFLAGS := "-X github.com/hashicorp/nomad/version.GitCommit=$(GIT_COMMIT)$(GIT_DIRTY)" -GO_TAGS ?= +GO_TAGS ?= codegen_generated GO_TEST_CMD = $(if $(shell which gotestsum),gotestsum --,go test) @@ -262,11 +262,11 @@ dev: vendorfmt changelogfmt hclfmt ## Build for the current development platform @cp $(PROJECT_ROOT)/$(DEV_TARGET) $(GOPATH)/bin .PHONY: prerelease -prerelease: GO_TAGS=ui release +prerelease: GO_TAGS=ui codegen_generated release prerelease: generate-all ember-dist static-assets ## Generate all the static assets for a Nomad release .PHONY: release -release: GO_TAGS=ui release +release: GO_TAGS=ui codegen_generated release release: clean $(foreach t,$(ALL_TARGETS),pkg/$(t).zip) ## Build all release packages which can be built on this platform. @echo "==> Results:" @tree --dirsfirst $(PROJECT_ROOT)/pkg @@ -293,6 +293,7 @@ test-nomad: dev ## Run Nomad test suites $(if $(ENABLE_RACE),-race) $(if $(VERBOSE),-v) \ -cover \ -timeout=15m \ + -tags "$(GO_TAGS)" \ $(GOTEST_PKGS) $(if $(VERBOSE), >test.log ; echo $$? > exit-code) @if [ $(VERBOSE) ] ; then \ bash -C "$(PROJECT_ROOT)/scripts/test_check.sh" ; \ @@ -305,6 +306,7 @@ e2e-test: dev ## Run the Nomad e2e test suite $(if $(ENABLE_RACE),-race) $(if $(VERBOSE),-v) \ -cover \ -timeout=900s \ + -tags "$(GO_TAGS)" \ github.com/hashicorp/nomad/e2e/vault/ \ -integration diff --git a/client/structs/structs.go b/client/structs/structs.go index 169cf824c..eff8ceaf3 100644 --- a/client/structs/structs.go +++ b/client/structs/structs.go @@ -1,6 +1,6 @@ package structs -//go:generate codecgen -d 102 -o structs.generated.go structs.go +//go:generate codecgen -d 102 -t codec_generated -o structs.generated.go structs.go import ( "errors" diff --git a/nomad/structs/generate.sh b/nomad/structs/generate.sh index 04141c34a..c0409e707 100755 --- a/nomad/structs/generate.sh +++ b/nomad/structs/generate.sh @@ -2,4 +2,4 @@ set -e FILES="$(ls ./*.go | grep -v -e _test.go -e .generated.go | tr '\n' ' ')" -codecgen -d 100 -o structs.generated.go ${FILES} +codecgen -d 100 -t codec_generated -o structs.generated.go ${FILES}