JAL-3449 fix a getdownAppDir error introduced in previous commit 55f545014
authorBen Soares <bsoares@dundee.ac.uk>
Thu, 13 Feb 2020 15:28:46 +0000 (15:28 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Thu, 13 Feb 2020 15:28:46 +0000 (15:28 +0000)
build.gradle
gradle.properties

index cba67d5..84c38db 100644 (file)
@@ -120,11 +120,11 @@ ext {
   buildDist = true
 
   // the following values might be overridden by the CHANNEL switch
-  getdown_channel_name = CHANNEL.toLowerCase()
-  getdownDir = string("${getdown_channel_name}/${JAVA_VERSION}")
+  getdownChannelName = CHANNEL.toLowerCase()
+  getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
   getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
   getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher}")
-  getdownAppDir = getdown_app_dir_alt
+  getdownAppDistDir = getdown_app_dir_alt
   buildProperties = string("${classesDir}/${build_properties_file}")
   reportRsyncCmd = false
   switch (CHANNEL) {
@@ -132,18 +132,18 @@ ext {
     case "BUILD":
     // TODO: get bamboo build artifact URL for getdown artifacts
     getdown_channel_base = bamboo_channelbase
-    getdown_channel_name = string("${bamboo_planKey}/${JAVA_VERSION}")
+    getdownChannelName = string("${bamboo_planKey}/${JAVA_VERSION}")
     getdownAppBase = string("${bamboo_channelbase}/${bamboo_planKey}${bamboo_getdown_channel_suffix}/${JAVA_VERSION}")
     break
 
     case "RELEASE":
-    getdownAppDir = getdown_app_dir_release
+    getdownAppDistDir = getdown_app_dir_release
     reportRsyncCommand = true
     break
 
     case "ARCHIVE":
-    getdown_channel_name = CHANNEL.toLowerCase()+"/${JALVIEW_VERSION}"
-    getdownDir = string("${getdown_channel_name}/${JAVA_VERSION}")
+    getdownChannelName = CHANNEL.toLowerCase()+"/${JALVIEW_VERSION}"
+    getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
     getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
     if (!file("${ARCHIVEDIR}/${packageDir}").exists()) {
       throw new GradleException("Must provide an ARCHIVEDIR value to produce an archive distribution")
@@ -156,8 +156,8 @@ ext {
     break
 
     case "ARCHIVELOCAL":
-    getdown_channel_name = string("archive/${JALVIEW_VERSION}")
-    getdownDir = string("${getdown_channel_name}/${JAVA_VERSION}")
+    getdownChannelName = string("archive/${JALVIEW_VERSION}")
+    getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
     getdownAppBase = file(getdownWebsiteDir).toURI().toString()
     if (!file("${ARCHIVEDIR}/${packageDir}").exists()) {
       throw new GradleException("Must provide an ARCHIVEDIR value to produce an archive distribution")
@@ -179,8 +179,8 @@ ext {
     break
 
     case ~/^SCRATCH(|-[-\w]*)$/:
-    getdown_channel_name = CHANNEL
-    getdownDir = string("${getdown_channel_name}/${JAVA_VERSION}")
+    getdownChannelName = CHANNEL
+    getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
     getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
     reportRsyncCommand = true
     break
@@ -201,7 +201,7 @@ ext {
     println("Overriding getdown appbase with '${getdownAppBase}'")
   }
 
-  getdownAppDir = string("${getdownWebsiteDir}/${getdownAppDir}")
+  getdownAppDir = string("${getdownWebsiteDir}/${getdownAppDistDir}")
   //getdownJ11libDir = "${getdownWebsiteDir}/${getdown_j11lib_dir}"
   getdownResourceDir = string("${getdownWebsiteDir}/${getdown_resource_dir}")
   getdownInstallDir = string("${getdownWebsiteDir}/${getdown_install_dir}")
@@ -975,7 +975,6 @@ task getdownWebsite() {
   def getdownWebsiteResourceFilenames = []
   def getdownTextString = ""
   def getdownResourceDir = getdownResourceDir
-  def getdownAppDir = getdownAppDir
   def getdownResourceFilenames = []
 
   doFirst {
@@ -988,7 +987,7 @@ task getdownWebsite() {
       rename(build_properties_file, getdown_build_properties)
       into getdownAppDir
     }
-    getdownWebsiteResourceFilenames += "${getdownAppDir}/${getdown_build_properties}"
+    getdownWebsiteResourceFilenames += "${getdownAppDistDir}/${getdown_build_properties}"
 
     // go through properties looking for getdown_txt_...
     def props = project.properties.sort { it.key }
@@ -1057,7 +1056,7 @@ task getdownWebsite() {
     }
     codeFiles.sort().each{f ->
       def name = f.getName()
-      def line = "code = ${getdownAppDir}/${name}\n"
+      def line = "code = ${getdownAppDistDir}/${name}\n"
       getdownTextString += line
       copy {
         from f.getPath()
@@ -1089,6 +1088,7 @@ 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"))
 
@@ -1153,7 +1153,7 @@ task getdownDigest(type: JavaExec) {
   description = "Digest the getdown website folder"
   dependsOn getdownWebsite
   doFirst {
-    classpath = files("${getdownWebsiteDir}/${getdown_launcher}")
+    classpath = files(getdownLauncher)
   }
   main = "com.threerings.getdown.tools.Digester"
   args getdownWebsiteDir
@@ -1302,7 +1302,7 @@ task installers(type: com.install4j.gradle.Install4jTask) {
     'GETDOWN_WEBSITE_DIR': getdown_website_dir,
     'GETDOWN_FILES_DIR': getdown_files_dir,
     'GETDOWN_RESOURCE_DIR': getdown_resource_dir,
-    'GETDOWN_DIST_DIR': getdownAppDir,
+    'GETDOWN_DIST_DIR': getdownAppDistDir,
     'GETDOWN_ALT_DIR': getdown_app_dir_alt,
     'GETDOWN_INSTALL_DIR': getdown_install_dir,
     'INFO_PLIST_FILE_ASSOCIATIONS_FILE': install4j_info_plist_file_associations,
index c5deb83..51a37ac 100644 (file)
@@ -128,7 +128,6 @@ dev = false
 
 CHANNEL=LOCAL
 getdown_channel_base = https://www.jalview.org/getdown
-getdown_channel_name = SCRATCH-DEFAULT
 getdown_app_dir_release = release
 getdown_app_dir_alt = alt
 getdown_app_dir_java = jre