#!/bin/bash version=`cat VERSION` echo "version: $version" 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 MIVA master git push --tags MIVA master # tag deploy cd ../../deploy/MIVA git add -A git commit -m "version $version" git tag -a "$version" -m "version $version" git push origin master git push --tags origin master # SET THE FOLLOWING VARIABLES # docker hub username USERNAME=192.168.31.174:8080/miva IMAGE=mivainfer docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version IMAGE=mivadb docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version # push it # mivainfer IMAGE=mivainfer docker push $USERNAME/$IMAGE:latest docker push $USERNAME/$IMAGE:$version # mivadb IMAGE=mivadb docker push $USERNAME/$IMAGE:latest docker push $USERNAME/$IMAGE:$version # remove IMAGE=mivadb docker rmi $USERNAME/$IMAGE:latest docker rmi $USERNAME/$IMAGE:$version IMAGE=mivainfer docker rmi $USERNAME/$IMAGE:latest docker rmi $USERNAME/$IMAGE:$version