2018-08-20 18:29:28 +00:00
|
|
|
set -ex
|
|
|
|
# SET THE FOLLOWING VARIABLES
|
|
|
|
# docker hub username
|
|
|
|
USERNAME=thinkcompany
|
|
|
|
# image name
|
|
|
|
IMAGE=docker-node-deploy
|
|
|
|
# ensure we're up to date
|
|
|
|
git pull
|
|
|
|
# bump version
|
|
|
|
docker run --rm -v "$PWD":/app thinkcompany/docker-node-deploy patch
|
|
|
|
version=`cat VERSION`
|
|
|
|
echo "version: $version"
|
|
|
|
# run build
|
2018-08-20 18:30:20 +00:00
|
|
|
./bin/build.sh
|
2018-08-20 18:29:28 +00:00
|
|
|
# tag it
|
|
|
|
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
|