JAL-3328 Getdown version number, changed to 1.8.3-1.0_JVL
[jalview.git] / getdown / src / getdown / mvn_cmd
1 #!/usr/bin/env bash
2
3 export VERSION=1.8.3-1.0_JVL
4
5 if [ x${VERSION%_JVL} = x$VERSION ]; then
6   VERSION=${VERSION}_JVL
7 fi
8
9 echo "Setting VERSION to '$VERSION'"
10
11 perl -p -i -e 's|(<version>)[^<]*JVL[^<]*(</version>)|${1}$ENV{VERSION}${2}|;' pom.xml */pom.xml
12
13 mvn clean package -Dgetdown.host.whitelist="jalview.org,*.jalview.org"
14 RET=$?
15 if [ x$RET = x0 ]; then
16   cp launcher/target/getdown-launcher-$VERSION.jar ../../../getdown/lib/getdown-launcher.jar
17   cp core/target/getdown-core-$VERSION.jar ../../../getdown/lib/getdown-core.jar
18   cp core/target/getdown-core-$VERSION.jar ../../../j8lib/getdown-core.jar
19   cp core/target/getdown-core-$VERSION.jar ../../../j11lib/getdown-core.jar 
20 fi