Ticket #33889: github-rss.patch

File github-rss.patch, 1.4 KB (added by seanfarley (Sean Farley), 13 years ago)
  • dports/_resources/port1.0/group/github-1.0.tcl

    # HG changeset patch
    # User Sean Farley <sean@mcs.anl.gov>
    # Date 1333495934 18000
    # Node ID 6b7b46e902aac10dbe78bab09401ef593f51c1cd
    # Parent  46640b717cdbab2c33490aca13c1f0b8d4f38010
    github: add rss-type of livecheck for commit hashes diretly sent to the group
    
    diff --git a/dports/_resources/port1.0/group/github-1.0.tcl b/dports/_resources/port1.0/group/github-1.0.tcl
    a b  
    8181            ${master_sites} == ${github.master_sites} && [llength ${distfiles}] > 0} {
    8282            move [glob ${workpath}/*] ${worksrcpath}
    8383        }
    8484    }
    8585   
    86     livecheck.type          regex
    87     livecheck.url           ${github.homepage}/tags
    88     livecheck.regex         tarball/[join ${github.tag_prefix} ""](\[^"\]+)
     86    # if the length of gh_version is 40 then this means the port sent an actual commit hash so we
     87    # should check the rss feed for a new one
     88    if {[string length ${github.version}] == 40} {
     89        livecheck.type          regexm
     90        livecheck.url           ${github.homepage}/commits/master.atom
     91        livecheck.version       ${github.version}
     92        livecheck.regex         {<id>tag:github.com,2008:Grit::Commit/([0-9a-z]+)</id>}
     93    } else {
     94        livecheck.type          regex
     95        livecheck.url           ${github.homepage}/tags
     96        livecheck.regex         tarball/[join ${github.tag_prefix} ""](\[^"\]+)
     97    }
    8998}