-
Notifications
You must be signed in to change notification settings - Fork 19
/
release
executable file
·49 lines (43 loc) · 1.04 KB
/
release
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
#!/bin/bash
#
#{{IS_NOTE
# Purpose:
# Description:
# History:
# April 7 17:38:16 2014, Created by jumperchen
#}}IS_NOTE
#
#Copyright (C) 2014 Potix Corporation. All Rights Reserved.
#
#{{IS_RIGHT
#}}IS_RIGHT
#
if [[ -d "ckez" ]]; then
cd ckez
else
echo "cannot locate ckez/"
exit 1
fi
ver=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout | grep -e '^[^\[]' | sed 's/-SNAPSHOT//')
stamp=$(date +%Y%m%d)
target=$1
if [[ "$target" == "official" ]] ; then
mver=$ver
elif [[ "$target" == "FL" ]] ; then
mver=$ver-FL-$stamp
else
echo "Usage: release [official|FL]"
exit 1
fi
echo Version=$mver
# update pom version
mvn org.codehaus.mojo:versions-maven-plugin:2.4:set -DnewVersion=$mver
mvn -Dmaven.test.skip=true clean package
if [[ "$target" == "FL" ]] ; then
# revert back pom.xml, as it is FL release
echo "FL release, revert back version number change"
mvn org.codehaus.mojo:versions-maven-plugin:2.4:revert
else
mvn org.codehaus.mojo:versions-maven-plugin:2.4:commit
fi
echo "All done!!!"