Skip to content

Commit

Permalink
Makefile fixes
Browse files Browse the repository at this point in the history
Some makefile fixes:

* Include `lint-yaml` target when doing `make lint`
* Add `generate` target that would includes all the generation targets (ie man
  docs/golden)
* Fix make fmt, $() is evaluated in makefile, need to use backquote for subshell
  exansion
  • Loading branch information
chmouel committed Feb 6, 2020
1 parent 0552563 commit 7a274ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Expand Up @@ -47,7 +47,7 @@ check: lint test
test: test-unit ## run all tests

.PHONY: lint
lint: ## run linter(s)
lint: lint-yaml ## run linter(s)
@echo "Linting..."
@golangci-lint run ./... --timeout 5m

Expand Down Expand Up @@ -80,13 +80,16 @@ man: bin/docs ## update manpages
@echo "Update generated manpages"
@./bin/docs --target=./docs/man/man1 --kind=man

.PHONY: generated
generated: test-unit-update-golden man docs fmt ## generate all files that needs to be generated

.PHONY: clean
clean: ## clean build artifacts
rm -fR bin VERSION

.PHONY: fmt ## formats teh god code(excludes vendors dir)
.PHONY: fmt ## formats the GO code(excludes vendors dir)
fmt:
@go fmt $(go list ./... | grep -v /vendor/)
@go fmt `go list ./... | grep -v /vendor/`

.PHONY: help
help: ## print this help
Expand Down

0 comments on commit 7a274ce

Please sign in to comment.