| 1234567891011121314151617181920212223242526 | #!/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/v2ray.com/coreecho "Adding a new tag: " "v$VER"git tag -s -a "v$VER" -m "$MSG"sed -i '' "s/\(version *= *\"\).*\(\"\)/\1$VERN\2/g" core.goecho "Commiting core.go (may not necessary)"git commit core.go -S -m "Update version"echo "Pushing changes"git push --follow-tagspopd
 |