JAL-4004 Temporary mechanism to add JalviewJS link for selected versions to hugo...
[jalview.git] / build.gradle
index 18af797..17aec88 100644 (file)
@@ -2463,6 +2463,7 @@ task hugoTemplates {
   def releaseMdFile = file("${jalviewDir}/${releases_dir}/release-${JALVIEW_VERSION_UNDERSCORES}.md")
   def whatsnewMdFile = file("${jalviewDir}/${whatsnew_dir}/whatsnew-${JALVIEW_VERSION_UNDERSCORES}.md")
   def oldJvlFile = file("${jalviewDir}/${hugo_old_jvl}")
   def releaseMdFile = file("${jalviewDir}/${releases_dir}/release-${JALVIEW_VERSION_UNDERSCORES}.md")
   def whatsnewMdFile = file("${jalviewDir}/${whatsnew_dir}/whatsnew-${JALVIEW_VERSION_UNDERSCORES}.md")
   def oldJvlFile = file("${jalviewDir}/${hugo_old_jvl}")
+  def jalviewjsFile = file("${jalviewDir}/${hugo_jalviewjs}")
 
   doFirst {
     // specific release template for version archive
 
   doFirst {
     // specific release template for version archive
@@ -2486,6 +2487,7 @@ task hugoTemplates {
     }
 
     def oldJvl = oldJvlFile.exists() ? oldJvlFile.collect{it} : []
     }
 
     def oldJvl = oldJvlFile.exists() ? oldJvlFile.collect{it} : []
+    def jalviewjsLink = jalviewjsFile.exists() ? jalviewjsFile.collect{it} : []
 
     def changesHugo = null
     if (changes != null) {
 
     def changesHugo = null
     if (changes != null) {
@@ -2549,6 +2551,7 @@ task hugoTemplates {
           CHANGES: changesHugo,
           DATE: givenDate == null ? "" : givenDate.format("yyyy-MM-dd"),
           DRAFT: givenDate == null ? "true" : "false",
           CHANGES: changesHugo,
           DATE: givenDate == null ? "" : givenDate.format("yyyy-MM-dd"),
           DRAFT: givenDate == null ? "true" : "false",
+          JALVIEWJSLINK: jalviewjsLink.contains(JALVIEW_VERSION) ? "true" : "false",
           JVL_HEADER: oldJvl.contains(JALVIEW_VERSION) ? "jvl: true" : ""
         ]
       )
           JVL_HEADER: oldJvl.contains(JALVIEW_VERSION) ? "jvl: true" : ""
         ]
       )