Skip to content

Commit

Permalink
Fix sdk codegen Makefile. Add tool debug msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean-Coakley committed Feb 29, 2024
1 parent c56cc90 commit 088453f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Makefile.tools
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/make -f

BUF = "github.com/bufbuild/buf/cmd/[email protected]"
OAPI_CODEGEN = "github.com/deepmap/oapi-codegen/v2/cmd/[email protected]"
LEFTHOOK = "github.com/evilmartians/[email protected]"
Expand Down Expand Up @@ -31,4 +33,5 @@ install-tools: ## Install tool dependencies
@$(GOGET) $(MOCKGEN)
@$(GOINST) $(GOFUMPT)
@$(GOGET) $(COUNTERFEITER)
@echo "Setting up git hooks"
@$(GORUN) $(LEFTHOOK) install pre-push
2 changes: 1 addition & 1 deletion sdk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 088453f

Please sign in to comment.