1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-12 19:37:16 +00:00

Implement auto release support in tfw.sh

This commit is contained in:
Kristóf Tóth 2018-03-30 20:28:36 +02:00
parent 1f784e1502
commit a167195009

View File

@ -24,6 +24,18 @@ run_frontend()
yarn start
}
release_baseimage()
{
cd $BASEIMAGE_PATH
TAG="$(baseimage_releasename)"
read -p "Tag and push new TFW version \"${TAG}\"? [y/N]" -r && echo
if [[ $REPLY =~ ^(y|Y|yes|Yes|YES)$ ]]
then
git tag -s -m "$1" "$TAG"
git push origin $TAG
fi
}
build_baseimage()
{
cd $BASEIMAGE_PATH
@ -84,11 +96,15 @@ case $1 in
buildstart)
build_and_start_tfw
;;
release)
release_baseimage
;;
*)
echo "Usage: tfw.sh [buildtfw|build|start|buildstart]"
echo " |--- buildtfw: build TFW baseimage"
echo " |--- build: build TFW test"
echo " |--- start: start TFW test"
echo " |--- buildtfw: build TFW baseimage"
echo " |--- build: build TFW test"
echo " |--- start: start TFW test"
echo " |--- buildstart: build all, then start TFW test"
echo " |--- release: tag TFW baseimage and push to upstream"
;;
esac