forked from qos-ch/slf4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·57 lines (37 loc) · 947 Bytes
/
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
53
54
55
56
57
# Javadoc
#JDK8 - mvn site:site
#rscpSLF4J apidocs/
#mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${VERSION_NUMBER}
MVN='/java/maven-3.5.2//bin/mvn'
function checkExit(){
if test "$?" != "0"; then
echo Command $1 exited with abnormal status
exit 1;
else echo $?
fi
}
function echoRunAndCheck () { # echo and then run the command
echo $1
$1
ret=$?
if test "$ret" != "0";
then
echo Failed command: $1
exit 1;
else echo Successful run: $1
fi
}
echoRunAndCheck "$MVN clean"
echoRunAndCheck "$MVN install"
#echoRunAndCheck "$MVN site:site"
#echoRunAndCheck "$MVN javadoc:aggregate"
#echoRunAndCheck "$MVN jxr:aggregate"
if [ ! -z "$PASS" ]
then
export GPG_TTY=$(tty)
echoRunAndCheck "$MVN deploy -P javadocjar,sign-artifacts"
fi
git tag -m "tagging" -a v_${VERSION_NUMBER}
git push --tags
#Update release version and add next version on jira
echo Full Success