mirror of
https://github.com/alrayyes/docker-alpine-hugo-git-bash
synced 2023-11-14 15:56:26 +00:00
28 lines
479 B
Bash
28 lines
479 B
Bash
|
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
|
||
|
|
||
|
docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version
|
||
|
|
||
|
# push it
|
||
|
docker push $USERNAME/$IMAGE:latest
|
||
|
docker push $USERNAME/$IMAGE:$version
|