-
Notifications
You must be signed in to change notification settings - Fork 3
/
release.sh
executable file
·52 lines (38 loc) · 1.47 KB
/
release.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
CurrentRelease=$1
Release=$2
NextRelease=$3
if [ -z "$CurrentRelease" ]
then
echo "Set Current Release eg. 1.1 " >&2
exit 1
fi
if [ -z "$Release" ]
then
echo "Set Release eg. 1.2 " >&2
exit 1
fi
# Update POMs - Remove -SNAPSHOT
java -cp assets/utilities/release.jar com.bluenimble.platform.release.Replace pom.xml "<version>$Release.0-SNAPSHOT</version><!--bn.version-->" "<version>$Release.0</version><!--bn.version-->"
# Update README
java -cp assets/utilities/release.jar com.bluenimble.platform.release.Replace README.md "$CurrentRelease.0" "$Release.0"
git add .
git commit -m "Update POMs for Release $Release.0"
git push origin master
# Build Server and CLI
mvn clean install
# Create branches
git checkout -b $Release
git tag -a v$Release.0 -m "Release V$Release.0"
git push -u origin $Release
git push origin v$Release.0
# Update POMs - Replace $Release by $NextRelease-SNAPSHOT
java -cp assets/utilities/release.jar com.bluenimble.platform.release.Replace pom.xml "<version>$Release.0</version><!--bn.version-->" "<version>$NextRelease.0-SNAPSHOT</version><!--bn.version-->"
git checkout master
git add .
git commit -m "Update POMs for next snapshot $NextRelease.0-SNAPSHOT"
git push origin master
cd build
tar -czf bluenimble-$Release.0-bin.tar.gz bluenimble-$Release.0
tar -czf bluenimble-cli-$Release.0-bin.tar.gz bluenimble-cli-$Release.0
zip -r bluenimble-$Release.0-bin.zip bluenimble-$Release.0
zip -r bluenimble-cli-$Release.0-bin.zip bluenimble-cli-$Release.0