| 12345678910111213141516171819202122232425 | #!/bin/bashVER=$1MSG=$2if [ -z "$MSG" ]; then  MSG="Weekly Release"fiecho Creating a new release: $VER: $MSGIFS="." read -a PARTS <<< "$VER"MAJOR=${PARTS[0]}MINOR=${PARTS[1]}MINOR=$((MINOR+1))VERN=${MAJOR}.${MINOR}pushd $GOPATH/src/github.com/v2ray/v2ray-coreecho "Adding a new tag: " "v$VER"git tag -s -a "v$VER" -m "$MSG"echo "Commiting core.go (may not necessary)"sed -i '' "s/\(version *= *\"\).*\(\"\)/\1$VERN\2/g" core.goecho "Pushing changes"git push --follow-tagspopd
 |