github.com/erda-project/erda-infra@v1.0.9/providers/component-protocol/protobuf/proto-go/Makefile (about) 1 .PHONY: build clean 2 build: auto-update-infra-for-master 3 @./build.sh build 4 @go mod tidy 5 @echo "" && make format 6 clean: 7 @./build.sh clean 8 9 format: 10 @echo "run gofmt && goimports" 11 @GOFILES=$$(find . -name "*.go"); \ 12 for path in $${GOFILES}; do \ 13 gofmt -w -l $${path}; \ 14 goimports -w -l $${path}; \ 15 done; 16 17 auto-update-infra-for-master: 18 @if [[ "$$(git rev-parse --abbrev-ref HEAD)" == "master" ]]; then \ 19 make update-infra; \ 20 fi; 21 22 update-infra: 23 echo "update infra and gohub" 24 go get -u github.com/erda-project/erda-infra/tools/gohub