makefile 1006 B

12345678910111213141516171819202122232425262728293031323334353637
  1. .DEFAULT_GOAL := everything
  2. V="v1.0.$(shell date +%Y%m%d%H%M%S)"
  3. dependencies:
  4. @echo Downloading Dependencies
  5. @go get ./...
  6. build: dependencies
  7. @echo Compiling Apps
  8. @echo --- eliza-server $(V)
  9. @go build -o eliza-server -ldflags="-s -w -X git.riomhaire.com/gremlin/elizaservice/infrastructure.Version=$(V)" git.riomhaire.com/gremlin/elizaservice
  10. @upx -9 eliza-server
  11. @cp eliza-server ${GOPATH}/bin
  12. @echo Done Compiling Apps
  13. build-arm: dependencies
  14. @echo Compiling Apps
  15. @echo --- eliza-server arm version
  16. @GOOS=linux GOARCH=arm GOARM=5 go build -o eliza-server-arm -ldflags="-s -w -X git.riomhaire.com/gremlin/elizaservice/infrastructure.Version=$(V)" git.riomhaire.com/gremlin/elizaservice
  17. @upx -9 eliza-server-arm
  18. @echo Done Compiling Apps
  19. test:
  20. @echo Running Unit Tests
  21. @go test ./...
  22. clean:
  23. @echo Cleaning
  24. @go clean
  25. @rm -f eliza-server
  26. @rm -f eliza-server-arm
  27. @rm -f coverage*.html
  28. @find . -name "debug.test" -exec rm -f {} \;
  29. everything: clean build test
  30. @echo Done