From ff551700027c13f833ebfaf01e41c7fc541240cd Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Thu, 2 May 2019 20:15:50 +1000 Subject: [PATCH] chore: improve updateversion.sh --- scripts/updateversion.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/updateversion.sh b/scripts/updateversion.sh index cf221056c..3b62e0c12 100755 --- a/scripts/updateversion.sh +++ b/scripts/updateversion.sh @@ -1,8 +1,15 @@ #!/usr/bin/env bash -TAG=$(git describe --abbrev=0 --tags) +if [ "$#" != "1" ]; then + echo "Tag required" + exit 1 +fi +TAG=${1} cat << EOF > cmd/version.go package cmd // Version - Wails version const Version = "${TAG}" -EOF \ No newline at end of file +EOF +git add cmd/version.go +git commit cmd/version.go -m "Bump to ${TAG}" +git tag ${TAG}