release.sh 847 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. version=`cat VERSION`
  3. echo "version: $version"
  4. # SET THE FOLLOWING VARIABLES
  5. # docker hub username
  6. USERNAME=192.168.31.174:5000
  7. IMAGE=mivainfer
  8. cp ../source/bin/main ../../../deploy/MIVA/source/bin/
  9. cp ../lib/* ../../../deploy/MIVA/lib
  10. # cp -rf ../source/config/* ../../../deploy/MIVA/source/config/
  11. echo "version: $version" > ../../../deploy/MIVA/version
  12. ./clear.sh
  13. # run build
  14. ./build.sh
  15. # tag source
  16. cd ../
  17. git add -A
  18. git commit -m "version $version"
  19. git tag -a "$version" -m "version $version"
  20. # git push
  21. # git push --tags
  22. # tag deploy
  23. cd ../../deploy/MIVA
  24. git add -A
  25. git commit -m "version $version"
  26. git tag -a "$version" -m "version $version"
  27. # git push
  28. # git push --tags
  29. docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version
  30. # push it
  31. docker push $USERNAME/$IMAGE:latest
  32. docker push $USERNAME/$IMAGE:$version