2017-09-15 19:37:51 +00:00
|
|
|
set -ex
|
|
|
|
|
|
|
|
USERNAME=andthensome
|
|
|
|
IMAGE=alpine-hugo-git-bash
|
|
|
|
|
|
|
|
git pull
|
|
|
|
|
|
|
|
# bump version
|
|
|
|
sudo docker run --rm -v "$PWD":/app treeder/bump patch
|
|
|
|
version=`cat VERSION`
|
|
|
|
echo "version: $version"
|
|
|
|
|
|
|
|
# run build
|
|
|
|
./build.sh
|
|
|
|
|
|
|
|
# tag it
|
|
|
|
git add -A
|
|
|
|
git commit -m "version $version"
|
|
|
|
git tag -a "$version" -m "version $version"
|
|
|
|
git push
|
|
|
|
git push --tags
|
|
|
|
|
2017-09-15 19:39:51 +00:00
|
|
|
sudo docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version
|
2017-09-15 19:37:51 +00:00
|
|
|
|
|
|
|
# push it
|
2017-09-15 19:39:51 +00:00
|
|
|
docker push $USERNAME/$IMAGE:latest
|
2017-09-15 19:37:51 +00:00
|
|
|
docker push $USERNAME/$IMAGE:$version
|