2016-07-27 15:50:24 +00:00
|
|
|
#!/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}
|
|
|
|
|
2016-08-20 18:55:45 +00:00
|
|
|
pushd $GOPATH/src/v2ray.com/core
|
2016-07-27 15:50:24 +00:00
|
|
|
echo "Adding a new tag: " "v$VER"
|
|
|
|
git tag -s -a "v$VER" -m "$MSG"
|
|
|
|
sed -i '' "s/\(version *= *\"\).*\(\"\)/\1$VERN\2/g" core.go
|
2016-08-01 15:50:55 +00:00
|
|
|
echo "Commiting core.go (may not necessary)"
|
2016-08-07 15:13:18 +00:00
|
|
|
git commit core.go -S -m "Update version"
|
2016-07-27 15:50:24 +00:00
|
|
|
echo "Pushing changes"
|
|
|
|
git push --follow-tags
|
|
|
|
popd
|