ETCD后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
648 B

3 years ago
  1. default:
  2. @echo 'Usage of make: [ build | linux_build | windows_build | docker_build | docker_run | clean ]'
  3. build:
  4. @go build -o ./bin/ems ./
  5. linux_build:
  6. @CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/ems ./
  7. windows_build:
  8. @CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ./bin/ems.exe ./
  9. docker_build: linux_build
  10. docker build -t shiguanghuxian/etcd-manage .
  11. docker_run: docker_build
  12. docker-compose up --force-recreate
  13. run: build
  14. @./bin/ems
  15. install: build
  16. @mv ./bin/ems $(GOPATH)/bin/ems
  17. clean:
  18. @rm -f ./bin/ems*
  19. @rm -f ./bin/logs/*
  20. .PHONY: default build linux_build windows_build docker_build docker_run clean