forked from qos-ch/slf4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·55 lines (39 loc) · 1.07 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
53
54
55
#mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${VERSION_NUMBER}
MVN='/java/maven-3.5.2//bin/mvn'
PASS=$1
echo $PASS
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 Succussful run: $1
fi
}
echoRunAndCheck "$MVN clean"
echoRunAndCheck "$MVN install"
#echoRunAndCheck "$MVN site:site"
echoRunAndCheck "$MVN javadoc:aggregate"
echoRunAndCheck "$MVN jxr:aggregate"
echoRunAndCheck "$MVN assembly:single"
if [ ! -z "$PASS" ]
then
echoRunAndCheck "$MVN deploy -P javadocjar,sign-artifacts -Dgpg.passphrase=$PASS"
fi
#$MVN site:deploy -N # with Java 8!!!
#checkExit "mvn site:deploy -N"
#git tag -m "tagging" -a v_${VERSION_NUMBER}
#git push --tags
#release version and add next version on jira
# for 1.7.x series, scp slf4j-1.7.*.tar.gz yvo.qos.ch:/var/www/www.slf4j.org/htdocs/dist/
echo Full Success