new docker build for build server task
This commit is contained in:
parent
aed2d34149
commit
9c0c263fce
33
deploy.sh
33
deploy.sh
|
@ -144,6 +144,7 @@ function sync_unstable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# new function, sync only tag, build with build server
|
||||||
function sync_docker {
|
function sync_docker {
|
||||||
|
|
||||||
# check things
|
# check things
|
||||||
|
@ -152,13 +153,40 @@ function sync_docker {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "latest tags:"
|
||||||
|
git tag | tail -n 5 | sort -r
|
||||||
|
|
||||||
|
printf "\ncreate new version:\n"
|
||||||
|
read -r VERSION
|
||||||
|
|
||||||
|
echo "push new tag: $VERSION?"
|
||||||
|
read -rn 1
|
||||||
|
|
||||||
|
# create release tag
|
||||||
|
echo "commits since last version:"
|
||||||
|
git log "$(git describe --tags --abbrev=0)"..HEAD --oneline
|
||||||
|
git tag -a "$VERSION" -m "new release version $VERSION"
|
||||||
|
git push origin "$VERSION"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# old builder, sync tag, build and push locally
|
||||||
|
function sync_docker_old {
|
||||||
|
|
||||||
|
# check things
|
||||||
|
if [[ $(git branch --show-current) != 'master' ]]; then
|
||||||
|
echo 'you are not on master, dummy!'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $(systemctl is-active docker) != 'active' ]]; then
|
if [[ $(systemctl is-active docker) != 'active' ]]; then
|
||||||
echo "starting docker"
|
echo "starting docker"
|
||||||
sudo systemctl start docker
|
sudo systemctl start docker
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "latest tags:"
|
echo "latest tags:"
|
||||||
git tag | tail -n 10
|
git tag | tail -n 5 | sort -r
|
||||||
|
|
||||||
printf "\ncreate new version:\n"
|
printf "\ncreate new version:\n"
|
||||||
read -r VERSION
|
read -r VERSION
|
||||||
|
@ -176,7 +204,7 @@ function sync_docker {
|
||||||
echo "commits since last version:"
|
echo "commits since last version:"
|
||||||
git log "$(git describe --tags --abbrev=0)"..HEAD --oneline
|
git log "$(git describe --tags --abbrev=0)"..HEAD --oneline
|
||||||
git tag -a "$VERSION" -m "new release version $VERSION"
|
git tag -a "$VERSION" -m "new release version $VERSION"
|
||||||
git push all "$VERSION"
|
git push origin "$VERSION"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +219,6 @@ elif [[ $1 == "validate" ]]; then
|
||||||
validate "$2"
|
validate "$2"
|
||||||
elif [[ $1 == "docker" ]]; then
|
elif [[ $1 == "docker" ]]; then
|
||||||
sync_docker
|
sync_docker
|
||||||
sync_unstable
|
|
||||||
elif [[ $1 == "unstable" ]]; then
|
elif [[ $1 == "unstable" ]]; then
|
||||||
sync_unstable
|
sync_unstable
|
||||||
elif [[ $1 == "es" ]]; then
|
elif [[ $1 == "es" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue