From db02a2dcc2a445db8aeaa6b74cc39acaaddcafb2 Mon Sep 17 00:00:00 2001 From: v2ray Date: Wed, 27 Jul 2016 17:50:24 +0200 Subject: [PATCH] quick release script --- tools/release/release.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tools/release/release.sh diff --git a/tools/release/release.sh b/tools/release/release.sh new file mode 100755 index 00000000..8a01a733 --- /dev/null +++ b/tools/release/release.sh @@ -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 \ No newline at end of file