5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 00:59:34 +08:00

chore: improve updateversion.sh

This commit is contained in:
Lea Anthony 2019-05-02 20:15:50 +10:00
parent 444db6a560
commit ff55170002
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -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
EOF
git add cmd/version.go
git commit cmd/version.go -m "Bump to ${TAG}"
git tag ${TAG}