From 56cd5a9931c84f400e552cd0f27e736e949d42d1 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Thu, 29 Feb 2024 14:45:57 +0000 Subject: [PATCH] Fix sdk codegen Makefile --- Makefile | 3 ++- sdk/Makefile | 2 +- test/integration/vendor/github.com/nginx/agent/sdk/v2/Makefile | 2 +- test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile | 2 +- vendor/github.com/nginx/agent/sdk/v2/Makefile | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 966f7a2b8e..bcd98dd7f2 100644 --- a/Makefile +++ b/Makefile @@ -114,6 +114,7 @@ build: ## Build agent executable GOWORK=off CGO_ENABLED=0 GOARCH=${OSARCH} ${GOBUILD} -pgo=auto -ldflags=${LDFLAGS} -o ./build/nginx-agent deps: ## Update dependencies in vendor folders + cd sdk && make generate for dir in ${VENDOR_LOCATIONS}; do \ (cd "$$dir" && echo "Running vendor commands on $$dir" && go mod tidy && GOWORK=off go mod vendor && cd "$$OLDPWD" || exit) \ done @@ -129,7 +130,7 @@ lint: ## Run linter cd sdk && make lint format: ## Format code - GOWORK=off $(GORUN) ${GOFUMPT} -l -w . + $(GORUN) ${GOFUMPT} -l -w . buf format -w ./sdk/proto/ generate-swagger: ## Generates swagger.json from source code diff --git a/sdk/Makefile b/sdk/Makefile index d47379b42c..5a88d94ab6 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -48,7 +48,7 @@ Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:\ proto/*.proto; \ grep -v '^swagger:' ./../docs/proto/proto.md > ./../docs/proto/tmp-proto.md && mv ./../docs/proto/tmp-proto.md ./../docs/proto/proto.md - go generate ./sdk/... + go generate ./... all-test: unit-test ## Run all tests diff --git a/test/integration/vendor/github.com/nginx/agent/sdk/v2/Makefile b/test/integration/vendor/github.com/nginx/agent/sdk/v2/Makefile index d47379b42c..5a88d94ab6 100644 --- a/test/integration/vendor/github.com/nginx/agent/sdk/v2/Makefile +++ b/test/integration/vendor/github.com/nginx/agent/sdk/v2/Makefile @@ -48,7 +48,7 @@ Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:\ proto/*.proto; \ grep -v '^swagger:' ./../docs/proto/proto.md > ./../docs/proto/tmp-proto.md && mv ./../docs/proto/tmp-proto.md ./../docs/proto/proto.md - go generate ./sdk/... + go generate ./... all-test: unit-test ## Run all tests diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile b/test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile index d47379b42c..5a88d94ab6 100644 --- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile +++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile @@ -48,7 +48,7 @@ Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:\ proto/*.proto; \ grep -v '^swagger:' ./../docs/proto/proto.md > ./../docs/proto/tmp-proto.md && mv ./../docs/proto/tmp-proto.md ./../docs/proto/proto.md - go generate ./sdk/... + go generate ./... all-test: unit-test ## Run all tests diff --git a/vendor/github.com/nginx/agent/sdk/v2/Makefile b/vendor/github.com/nginx/agent/sdk/v2/Makefile index d47379b42c..5a88d94ab6 100644 --- a/vendor/github.com/nginx/agent/sdk/v2/Makefile +++ b/vendor/github.com/nginx/agent/sdk/v2/Makefile @@ -48,7 +48,7 @@ Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:\ proto/*.proto; \ grep -v '^swagger:' ./../docs/proto/proto.md > ./../docs/proto/tmp-proto.md && mv ./../docs/proto/tmp-proto.md ./../docs/proto/proto.md - go generate ./sdk/... + go generate ./... all-test: unit-test ## Run all tests