build.sh 454 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. registry="172.16.61.95:5000"
  3. if [ ! -f ver ]; then
  4. echo 1 > ./ver
  5. fi
  6. ver=$(cat ./ver)
  7. ver=$((10#${ver}+1))
  8. echo $ver > ./ver
  9. cd .. && git pull # update code
  10. docker run --rm -v $(pwd):/home jaikuai/npm-mvn:v3 mvn clean install -Dmaven.test.skip=true -Dmaven.compile.fork=true package
  11. docker build -t $registry/hz/hz-admin-server:1.1.$ver .
  12. docker push $registry/hz/hz-admin-server:1.1.$ver
  13. echo $registry/hz/hz-admin-server:1.1.$ver