Ticket #42273: github-releases.patch
File github-releases.patch, 1.6 KB (added by bgilbert (Benjamin Gilbert), 11 years ago) |
---|
-
dports/_resources/port1.0/group/github-1.0.tcl
47 47 48 48 default master_sites {${github.master_sites}} 49 49 50 # The ability to host downloads on github is going away50 # The old GitHub "downloads" system is no longer accepting new files. 51 51 # 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 52 54 default github.tarball_from {tags} 53 55 option_proc github.tarball_from handle_tarball_from 54 56 proc 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 56 58 57 59 # 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 changed60 # the port writer can set github.tarball_from to "downloads" or "releases" and have the URI path accordingly changed 59 61 if {${action} eq "set" && $args eq "downloads"} { 60 62 github.tarball_from ${args} 61 63 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} 62 67 } 63 68 } 64 69