JAL-3289 Improved the name of the channel_launch.jvl file to channel_launch-CHANNELNA...
authorBen Soares <bsoares@dundee.ac.uk>
Wed, 19 Feb 2020 16:37:47 +0000 (16:37 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Wed, 19 Feb 2020 16:37:47 +0000 (16:37 +0000)
build.gradle
gradle.properties
utils/install4j/install4j8_template.install4j

index 27e040c..9dae53a 100644 (file)
@@ -126,6 +126,7 @@ ext {
   getdownAppDistDir = getdown_app_dir_alt
   buildProperties = string("${classesDir}/${build_properties_file}")
   reportRsyncCmd = false
+  jvlChannelName = CHANNEL.toLowerCase()
   switch (CHANNEL) {
 
     case "BUILD":
@@ -133,6 +134,7 @@ ext {
     getdown_channel_base = bamboo_channelbase
     getdownChannelName = string("${bamboo_planKey}/${JAVA_VERSION}")
     getdownAppBase = string("${bamboo_channelbase}/${bamboo_planKey}${bamboo_getdown_channel_suffix}/${JAVA_VERSION}")
+    jvlChannelName += "_${getdownChannelName}"
     break
 
     case "RELEASE":
@@ -208,6 +210,8 @@ ext {
     getdownAppBase = string(getProperty("getdown_appbase_override"))
     println("Overriding getdown appbase with '${getdownAppBase}'")
   }
+  // sanitise file name for jalview launcher file for this channel
+  jvlChannelName = jvlChannelName.replaceAll(/[^\w\-]/,"_")
 
   getdownAppDir = string("${getdownWebsiteDir}/${getdownAppDistDir}")
   //getdownJ11libDir = "${getdownWebsiteDir}/${getdown_j11lib_dir}"
@@ -1096,9 +1100,9 @@ task getdownWebsite() {
     def getdown_txt = file("${getdownWebsiteDir}/getdown.txt")
     getdown_txt.write(getdownTextString)
 
-    def getdownLaunchJvl = ( (getdownChannelName != null && getdownChannelName.length() > 0)?"${getdownChannelName}_":"" ) + getdown_launch_jvl
-    def launch_jvl = file("${getdownWebsiteDir}/${getdown_launch_jvl}")
-    launch_jvl.write("appbase="+props.get("getdown_txt_appbase"))
+    def getdownLaunchJvl = getdown_launch_jvl_name + ( (jvlChannelName != null && jvlChannelName.length() > 0)?"-${jvlChannelName}":"" ) + ".jvl"
+    def launchJvl = file("${getdownWebsiteDir}/${getdownLaunchJvl}")
+    launchJvl.write("appbase="+props.get("getdown_txt_appbase"))
 
     copy {
       from getdownLauncher
@@ -1133,7 +1137,7 @@ task getdownWebsite() {
 
     copy {
       from getdown_txt
-      from launch_jvl
+      from launchJvl
       from getdownLauncher
       from "${getdownWebsiteDir}/${getdown_build_properties}"
       if (file(getdownLauncher).getName() != getdown_launcher) {
index c1aece3..7a51138 100644 (file)
@@ -61,8 +61,8 @@ getdown_launcher = getdown-launcher.jar
 getdown_launcher_local = getdown-launcher-local.jar
 getdown_launcher_new = getdown-launcher-new.jar
 getdown_core = getdown/lib/getdown-core.jar
-getdown_launch_jvl = channel_launch.jvl
 getdown_build_properties = build_properties
+getdown_launch_jvl_name = channel_launch
 getdown_txt_allow_offline = true
 getdown_txt_max_concurrent_downloads = 10
 # now got better defaults when not set
index f7cab3d..4f37185 100644 (file)
@@ -749,7 +749,7 @@ return console.askYesNo(message, true);
                     </element>
                     <element index="18">
                       <object class="java.io.File">
-                        <string>channel_launch.jvl</string>
+                        <string>channel_launch*.jvl</string>
                       </object>
                     </element>
                     <element index="19">