123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #!/bin/bash
- version=`cat VERSION`
- echo "version: $version"
- # SET THE FOLLOWING VARIABLES
- # docker hub username
- USERNAME=192.168.31.174:5000
- IMAGE=mivainfer
- cp ../source/bin/main ../../../deploy/MIVA/source/bin/
- cp ../lib/* ../../../deploy/MIVA/lib
- # cp -rf ../source/config/* ../../../deploy/MIVA/source/config/
- echo "version: $version" > ../../../deploy/MIVA/version
- ./clear.sh
- # run build
- ./build.sh
- # tag source
- cd ../
- git add -A
- git commit -m "version $version"
- git tag -a "$version" -m "version $version"
- # git push
- # git push --tags
- # tag deploy
- cd ../../deploy/MIVA
- git add -A
- git commit -m "version $version"
- git tag -a "$version" -m "version $version"
- # git push
- # git push --tags
- docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version
- # push it
- docker push $USERNAME/$IMAGE:latest
- docker push $USERNAME/$IMAGE:$version
|