Ticket #42273: github-releases.patch

File github-releases.patch, 1.6 KB (added by bgilbert (Benjamin Gilbert), 11 years ago)

github-1.0.tcl patch

  • dports/_resources/port1.0/group/github-1.0.tcl

     
    4747
    4848default master_sites {${github.master_sites}}
    4949
    50 # The ability to host downloads on github is going away
     50# The old GitHub "downloads" system is no longer accepting new files.
    5151# https://github.com/blog/1302-goodbye-uploads
     52# It was replaced by "releases", which use different download URLs.
     53# https://github.com/blog/1547-release-your-software
    5254default github.tarball_from {tags}
    5355option_proc github.tarball_from handle_tarball_from
    5456proc handle_tarball_from {option action args} {
    55     global github.author github.project github.master_sites
     57    global github.author github.project github.master_sites git.branch
    5658
    5759    # keeping the default at tags like many portfiles already do
    58     # the port writer can set github.tarball_from to "downloads" and have the URI path accordingly changed
     60    # the port writer can set github.tarball_from to "downloads" or "releases" and have the URI path accordingly changed
    5961    if {${action} eq "set" && $args eq "downloads"} {
    6062        github.tarball_from ${args}
    6163        github.master_sites https://github.com/downloads/${github.author}/${github.project}
     64    } elseif {${action} eq "set" && $args eq "releases"} {
     65        github.tarball_from ${args}
     66        github.master_sites https://github.com/${github.author}/${github.project}/releases/download/${git.branch}
    6267    }
    6368}
    6469