[125634] trunk/dports/_resources/port1.0/group/bitbucket-1.0.tcl

ryandesign at macports.org ryandesign at macports.org
Tue Sep 23 05:36:36 PDT 2014


Revision: 125634
          https://trac.macports.org/changeset/125634
Author:   ryandesign at macports.org
Date:     2014-09-23 05:36:36 -0700 (Tue, 23 Sep 2014)
Log Message:
-----------
bitbucket-1.0.tcl: use a switch statement when setting livecheck

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/bitbucket-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/bitbucket-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/bitbucket-1.0.tcl	2014-09-23 12:35:22 UTC (rev 125633)
+++ trunk/dports/_resources/port1.0/group/bitbucket-1.0.tcl	2014-09-23 12:36:36 UTC (rev 125634)
@@ -92,16 +92,19 @@
         bitbucket.livecheck_type tags
     }
 
-    if {[string equal ${bitbucket.livecheck_type} "commits"]} {
-        livecheck.type      regexm
-        livecheck.url       ${bitbucket.homepage}/atom
-        livecheck.version   ${bitbucket.version}
-        livecheck.regex     <id>changeset:(\[0-9a-f\]{[string length ${bitbucket.version}]})\[0-9a-f\]*</id>
-    } else {
-        livecheck.type      regex
-        livecheck.version   ${bitbucket.version}
-        livecheck.url       ${bitbucket.homepage}/downloads
-        livecheck.regex     get/[join ${bitbucket.tag_prefix}](\[0-9\.\]+)${extract.suffix}
+    switch {${bitbucket.livecheck_type}} {
+        commits {
+            livecheck.type      regexm
+            livecheck.url       ${bitbucket.homepage}/atom
+            livecheck.version   ${bitbucket.version}
+            livecheck.regex     <id>changeset:(\[0-9a-f\]{[string length ${bitbucket.version}]})\[0-9a-f\]*</id>
+        }
+        default {
+            livecheck.type      regex
+            livecheck.version   ${bitbucket.version}
+            livecheck.url       ${bitbucket.homepage}/downloads
+            livecheck.regex     get/[join ${bitbucket.tag_prefix}](\[0-9\.\]+)${extract.suffix}
+        }
     }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140923/ae22a4db/attachment-0001.html>


More information about the macports-changes mailing list