build.sh 500 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. set -e
  3. go mod tidy
  4. go mod vendor
  5. docker pull golang:latest
  6. docker pull ubuntu:latest
  7. echo
  8. echo "# Local Build"
  9. go build -o ~/bin/helios cmd/main.go
  10. echo
  11. echo "# Docker Build"
  12. docker build -t helios:latest .
  13. du -sm ~/bin/helios
  14. docker image ls helios:latest
  15. echo
  16. echo "# Tag"
  17. docker tag helios:latest bmallenxs/heliosci:latest
  18. docker tag helios:latest heliosci/helios:latest
  19. echo
  20. echo "# Publish"
  21. echo docker push bmallenxs/heliosci:latest
  22. echo docker push heliosci/helios:latest