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

refactor: update Makefile #2

Merged
merged 1 commit into from
Oct 31, 2023
Merged
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
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
COLOR := "\e[1;36m%s\e[0m\n"

.PHONY: go-lint
go-lint:
.PHONY: golint
golint:
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && cd $$module && golangci-lint run ./... --fix); done

.PHONY: go-generate
go-generate:
.PHONY: gogenerate
gogenerate:
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && go generate -C $$module); done

.PHONY: go-mod-download
go-mod-download:
.PHONY: gomoddownload
gomoddownload:
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && go mod download -C $$module); done

.PHONY: go-mod-tidy
go-mod-tidy:
.PHONY: gomodtidy
gomodtidy:
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && go mod tidy -C $$module); done

.PHONY: go-test
go-test:
.PHONY: gotest
gotest:
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && go test -v -race $$module/...); done

.PHONY: go-work-sync
go-work-sync:
.PHONY: goworksync
goworksync:
@go work sync