+ getdownDir = ""
+ reportRsyncCmd = false
+ buildDist = true
+ buildProperties = buildPropertiesFile
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher
+ switch (CHANNEL) {
+
+ case "BUILD":
+ // TODO: get bamboo build artifact URL for getdown artifacts
+ getdown_channel_base = bamboo_channelbase
+ getdown_channel_name = bamboo_planKey + '/'+JAVA_VERSION
+ getdown_app_base = bamboo_channelbase + '/'+ bamboo_planKey + bamboo_getdown_channel_suffix + '/'+JAVA_VERSION
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ break
+
+ case "RELEASE":
+ getdown_channel_name = CHANNEL.toLowerCase()
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_release
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ reportRsyncCommand = true
+ break
+
+ case "ARCHIVE":
+ getdown_channel_name = CHANNEL.toLowerCase()+"/"+JALVIEW_VERSION
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_alt
+ if (!file(ARCHIVEDIR+"/"+packageDir).exists()) {
+ print "Must provide an ARCHIVEDIR value to produce an archive distribution"
+ exit
+ } else {
+ packageDir = ARCHIVEDIR + "/" + packageDir
+ buildProperties = ARCHIVEDIR +"/" + classesDir + "/" + buildPropertiesFile
+ buildDist = false
+ }
+ reportRsyncCommand = true
+ break
+
+ case "ARCHIVELOCAL":
+ getdown_channel_name = "archive" + "/" + JALVIEW_VERSION
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = file(getdownWebsiteDir).toURI().toString()
+ getdown_app_dir = getdown_app_dir_alt
+ if (!file(ARCHIVEDIR+"/"+packageDir).exists()) {
+ print "Must provide an ARCHIVEDIR value to produce an archive distribution"
+ exit
+ } else {
+ packageDir = ARCHIVEDIR + "/" + packageDir
+ buildProperties = ARCHIVEDIR +"/" + classesDir + "/" + buildPropertiesFile
+ buildDist = false
+ }
+ reportRsyncCommand = true
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher_local
+ break
+
+ case "DEVELOP":
+ getdown_channel_name = CHANNEL.toLowerCase()
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ reportRsyncCommand = true
+ break
+
+ case "TEST-RELEASE":
+ getdown_channel_name = CHANNEL.toLowerCase()
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ reportRsyncCommand = true
+ break
+
+ case ~/^SCRATCH(|-[-\w]*)$/:
+ getdown_channel_name = CHANNEL
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ reportRsyncCommand = true
+ break
+
+ case "LOCAL":
+ getdown_app_base = file(getdownWebsiteDir).toURI().toString()
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher_local
+ break
+
+ default: // something wrong specified
+ print("CHANNEL must be one of BUILD, RELEASE, ARCHIVE, DEVELOP, TEST-RELEASE, SCRATCH-..., LOCAL [default]")
+ exit
+ break
+
+ }
+
+ println("Using a "+CHANNEL+" profile. appbase="+getdown_app_base)