build_stable.sh 521 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. set -ex
  3. source ./common.sh
  4. cd ${ROOT}
  5. # 生成新版本
  6. # NEW_VERSION=$(autoVersion beta)
  7. NEW_VERSION="3.2.0"
  8. if [ "${NEW_VERSION}" != "" ]; then
  9. # 打标签 1.0.*
  10. git tag -a ${NEW_VERSION} -m "Jenkins" beta
  11. git push --tags
  12. # 1.0.*
  13. sudo docker tag ${BASE_NAME}:beta ${BASE_NAME}:${NEW_VERSION}
  14. sudo docker push ${BASE_NAME}:${NEW_VERSION}
  15. # stable
  16. sudo docker tag ${BASE_NAME}:beta ${BASE_NAME}:stable
  17. sudo docker push ${BASE_NAME}:stable
  18. fi
  19. cd ${SCRIPTS}