1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 06:16:09 -04:00

quick release script

This commit is contained in:
v2ray 2016-07-27 17:50:24 +02:00
parent 330abd126c
commit db02a2dcc2
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

25
tools/release/release.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
VER=$1
MSG=$2
if [ -z "$MSG" ]; then
MSG="Weekly Release"
fi
echo Creating a new release: $VER: $MSG
IFS="." read -a PARTS <<< "$VER"
MAJOR=${PARTS[0]}
MINOR=${PARTS[1]}
MINOR=$((MINOR+1))
VERN=${MAJOR}.${MINOR}
pushd $GOPATH/src/github.com/v2ray/v2ray-core
echo "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.go
echo "Pushing changes"
git push --follow-tags
popd