aboutsummaryrefslogtreecommitdiff
path: root/release.sh
blob: 30daedec720b2f6c073653cce37c2708ba5b5893 (plain)
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
58
59
60
61

# Javadoc

#JDK8 - mvn site:site
#rscpSLF4J apidocs/ 

# JDK 11+
# adding the following 
#mvn -Ddoclint=none -Dadditionalparam=-Xdoclint:none  javadoc:aggregate


#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