123456789101112131415161718192021 |
- GO_FILES=`go list ./... | grep -v -E "mock|store|test|fake|cmd|bin|backend|google|logger|proto"`
- proto-build:
- protoc -I=. --go_out=:./proto/go/ --go_opt=paths=source_relative \
- --go-grpc_out=:./proto/go/ --go-grpc_opt=paths=source_relative ./backend/common/*.proto
- protoc -I=. --go_out=:./proto/go/ --go_opt=paths=source_relative \
- --go-grpc_out=:./proto/go/ --go-grpc_opt=paths=source_relative ./backend/operation/*.proto
- ci-test:
- go test $(GO_FILES) -coverprofile .cover.txt
- go tool cover -func .cover.txt
- rm .cover.txt
- lint:
- golangci-lint run ./...
- build:
- rm -rf bin
- mkdir -p bin
- GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -o bin/kptTmrSheep -ldflags "-X kpt.kptyun.cn:3000/kpt-event/kpt-tmr-sheep/pod.appVersion=${version}" main.go
|