diff --git a/hack/tfw.sh b/hack/tfw.sh index aab7bdc..dcbf556 100755 --- a/hack/tfw.sh +++ b/hack/tfw.sh @@ -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