Ignore:
Timestamp:
Feb 6, 2012, 1:25:52 PM (8 years ago)
Author:
and.damore@…
Message:

github portgroup: support both "downloads" and "tags" download; when tag_prefix argument to github.setup is specified then master_sites URI path is set accordingly, otherwise a "download" path is used

File:
1 edited

Legend:

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

    r89669 r89670  
    4242default github.homepage {https://github.com/${github.author}/${github.project}}
    4343default github.raw {https://raw.github.com/${github.author}/${github.project}}
    44 default github.master_sites {${github.homepage}/tarball/[join ${github.tag_prefix} ""]}
    4544
    4645proc github.setup {gh_author gh_project gh_version {gh_tag_prefix ""}} {
     
    5756    git.url                 ${github.homepage}.git
    5857    git.branch              [join ${github.tag_prefix}]${github.version}
     58    # github supports two types of downloads "tags" and "downloads" with different URI scheme
     59    # choose either one according to existence of tag_prefix optional argument
     60    if {[info exists github.tag_prefix] && ![string equal ${github.tag_prefix} "{}"]} {
     61        github.master_sites ${github.homepage}/tarball/[join ${github.tag_prefix} ""]
     62    } else {
     63        github.master_sites https://github.com/downloads/${github.author}/${github.project}
     64    }
    5965    master_sites            ${github.master_sites}
    6066    distname                ${github.project}-${github.version}
Note: See TracChangeset for help on using the changeset viewer.