forked from getlantern/lantern
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.bash
executable file
·39 lines (27 loc) · 1.1 KB
/
release.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
function die() {
echo $*
exit 1
}
if [ $# -ne "0" ]
then
die "$0: Received $# args, none expected (I now get version from pom.xml)"
fi
./copypt.bash || die "Could not copy pluggable transports?"
VERSION=$(./parseversionfrompom.py | sed s/-SNAPSHOT//)
mvn release:clean || die "Could not clean release?"
mvn release:prepare || die "Could not prepare release?"
git=`git rev-parse --verify lantern-$VERSION^{commit} | cut -c1-7` || die "Could not get git version?"
echo "Tagging newest release at $git"
git tag -f -a latest -m "The most recent official Lantern release." $git || die "Could not tag newest?"
echo "Pushing tags..."
git push -f --tags || die "Could not push newest tag?"
#echo "Creating branch $1"
#git branch $1 lantern-$1 || die "Could not create a branch"
#git push origin $1 || die "Could not push new branch"
# We don't care about actually releasing -- just running the tests, tagging,
# incrementing the version -- so cleanup
mvn release:clean
# Update to the newest commited code
git pull || die "Could not pull?"
echo "Finished. You can release from the tag $VERSION"