From 0f2c93aacbea4e88100977d0d678337336b2107f Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 23 Nov 2018 19:43:11 -0500 Subject: [PATCH] tag guess --- make_tag.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/make_tag.sh b/make_tag.sh index b91e9fb67..14aadcccd 100755 --- a/make_tag.sh +++ b/make_tag.sh @@ -1,8 +1,14 @@ #!/bin/bash -read -p "Please generate CHANGELOG and commit it BEFORE you tag. Press a key when ready..." -orig=$1 -VER="${orig/v/}" +if [ -z "$1" ]; then + echo "Inferring version name from config.xml" + APPVER=`cat config.xml | grep "widget " | sed 's/.* version=\"\([^\"]*\)\" xmlns.*/\1/'` +else + APPVER=$1 +fi +VER="${APPVER/v/}" echo "Creating tag:v$VER" + +read -p "Please generate CHANGELOG and commit it BEFORE you tag. Press a key when ready..." read -p "Press any key to create the tag or Ctrl-C to break..." -n1 git tag -fa v$VER -m"v$VER" git push -f --tags