Makefile 608 B

123456789101112131415161718192021222324252627
  1. .PHONY: version
  2. save_dir=~/tmp
  3. version?=latest
  4. tag=reg.cestong.com.cn/cecf/i6000pusher:${version}
  5. release_tag=hub.js.sgcc.com.cn/observe/i6000pusher:${version}
  6. build:
  7. go build -o ./bin/i6000pusher git.cestong.com.cn/cecf/i6000pusher/cmd/i6000pusher
  8. run: build
  9. ./bin/i6000pusher
  10. gen-pb:
  11. protoc -I ./opentelemetry-proto -I ./pb --go_out=pkg/pb ./pb/flatspan.proto
  12. docker-build: build
  13. docker build . -t ${tag}
  14. docker-push: docker-build
  15. docker push ${tag}
  16. echo ${version} > ./version
  17. release:
  18. docker tag ${tag} ${release_tag}
  19. docker save ${release_tag} -o ${save_dir}/i6000pusher_${version}.tar