X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=getdown%2Fsrc%2Fgetdown%2Fmvn_cmd;fp=getdown%2Fsrc%2Fgetdown%2Fmvn_cmd;h=0cd54ebd336b72a9fa86b44e29de8915bb45a3a6;hb=e086b0c30bee5fe084186c65ef1ded42c58560f9;hp=0ce786ff8a839c58761aaef9c830fe3881d99a76;hpb=e51f922b88b1f316e27cf4c19eef437ff592d74d;p=jalview.git
diff --git a/getdown/src/getdown/mvn_cmd b/getdown/src/getdown/mvn_cmd
old mode 100644
new mode 100755
index 0ce786f..0cd54eb
--- a/getdown/src/getdown/mvn_cmd
+++ b/getdown/src/getdown/mvn_cmd
@@ -1 +1,31 @@
-mvn clean package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" && cp launcher/target/getdown-launcher-1.8.3-SNAPSHOT.jar ../../../getdown/lib/getdown-launcher.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../j8lib/getdown-core.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../j11lib/getdown-core.jar
+#!/usr/bin/env bash
+
+if [ x$JVLVERSION != x ]; then
+ export VERSION=$JVLVERSION
+else
+ export VERSION=1.8.3-1.1.8_JVL
+fi
+
+if [ x${VERSION%_JVL} = x$VERSION ]; then
+ VERSION=${VERSION}_JVL
+fi
+
+echo "Setting VERSION to '$VERSION'"
+perl -p -i -e 's|()[^<]*JVL[^<]*()|${1}$ENV{VERSION}${2}|;' pom.xml */pom.xml
+mvn package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" -Dallow_file_protocol=false -Dconnect_timeout=8 -Dread_timeout=15
+RET=$?
+if [ x$RET = x0 ]; then
+ cp launcher/target/getdown-launcher-$VERSION.jar ../../../getdown/lib/getdown-launcher.jar && echo "Copied getdown-launcher-$VERSION.jar to getdown/lib"
+ cp core/target/getdown-core-$VERSION.jar ../../../getdown/lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to getdown/lib"
+ cp core/target/getdown-core-$VERSION.jar ../../../j8lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to j8lib"
+ cp core/target/getdown-core-$VERSION.jar ../../../j11lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to j11lib"
+fi
+
+VERSION=${VERSION/JVL/FJVL}
+echo "Setting VERSION to '$VERSION'"
+perl -p -i -e 's|()[^<]*JVL[^<]*()|${1}$ENV{VERSION}${2}|;' pom.xml */pom.xml
+mvn package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" -Dallow_file_protocol=true -Dconnect_timeout=4 -Dread_timeout=4
+RET=$?
+if [ x$RET = x0 ]; then
+ cp launcher/target/getdown-launcher-$VERSION.jar ../../../getdown/lib/getdown-launcher-local.jar && echo "Copied getdown-launcher-$VERSION.jar to getdown/lib/getdown-launcher-local.jar"
+fi