Ignore:
Timestamp:
May 16, 2014, 11:48:41 PM (5 years ago)
Author:
ryandesign@…
Message:

github-1.0.tcl: remove unnecessary github.livecheck_type variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/github-1.0.tcl

    r115231 r120143  
    22# $Id$
    33#
    4 # Copyright (c) 2012-2013 The MacPorts Project
     4# Copyright (c) 2012-2014 The MacPorts Project
    55# All rights reserved.
    66#
     
    4444default github.raw {https://raw.github.com/${github.author}/${github.project}}
    4545default github.master_sites {${github.homepage}/tarball/[join ${github.tag_prefix} ""]${github.version}}
    46 default github.livecheck_type ""
    4746
    4847default master_sites {${github.master_sites}}
     
    6463
    6564proc github.setup {gh_author gh_project gh_version {gh_tag_prefix ""}} {
    66     global extract.suffix github.author github.project github.version github.tag_prefix github.homepage github.master_sites github.livecheck_type
     65    global extract.suffix github.author github.project github.version github.tag_prefix github.homepage github.master_sites
    6766
    6867    github.author           ${gh_author}
     
    9392    }
    9493
    95     # If the "commit" string from start to end is in [0-9a-f] to at
    96     # least 9 characters, and no tag is provided, then assume doing
    97     # commits type livecheck; else tags type.
    98 
     94    # If the "version" is composed entirely of hex characters, and is at least
     95    # nine characters long, and no tag_prefix is provided, then assume we are
     96    # using a commit hash and livecheck commits; otherwise livecheck tags.
    9997    if {[join ${github.tag_prefix}] eq "" && \
    10098        [regexp "^\[0-9a-f\]{9,}\$" ${github.version}]} {
    101         github.livecheck_type commits
     99        livecheck.type      regexm
     100        livecheck.url       ${github.homepage}/commits/master.atom
     101        livecheck.regex     <id>tag:github.com,2008:Grit::Commit/(\[0-9a-f\]{[string length ${github.version}]})\[0-9a-f\]*</id>
    102102    } else {
    103         github.livecheck_type tags
     103        livecheck.type      regex
     104        livecheck.url       ${github.homepage}/tags
     105        livecheck.regex     archive/[join ${github.tag_prefix} ""](\[^"\]+)${extract.suffix}
    104106    }
    105 
    106     if {${github.livecheck_type} eq "commits"} {
    107         livecheck.type          regexm
    108         livecheck.url           ${github.homepage}/commits/master.atom
    109         livecheck.version       ${github.version}
    110         livecheck.regex         <id>tag:github.com,2008:Grit::Commit/(\[0-9a-f\]{[string length ${github.version}]})\[0-9a-f\]*</id>
    111     } else {
    112         livecheck.type          regex
    113         livecheck.version       ${github.version}
    114         livecheck.url           ${github.homepage}/tags
    115         livecheck.regex         archive/[join ${github.tag_prefix} ""](\[^"\]+)${extract.suffix}
    116     }
     107    livecheck.version       ${github.version}
    117108}
Note: See TracChangeset for help on using the changeset viewer.