From a167195009c609366b83d4466302af1ec8ce4838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 30 Mar 2018 20:28:36 +0200 Subject: [PATCH] Implement auto release support in tfw.sh --- hack/tfw.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) 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