Ticket #42273: patch-github_portgroup.diff
File patch-github_portgroup.diff, 1.8 KB (added by anddam (Andrea D'Amore), 11 years ago) |
---|
-
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 github.homepage 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 66 # port maintainers will have to explictly set tag_prefix and distname 67 # in order to match the port's needs since there's no standard 68 # specifically if a release URL has a dash sign in it then tag prefix 69 # needs to contain the dash as well 70 # i.e. "v-1.2.3" requires a "v-" tag_prefix argument to github.setup 71 72 github.tarball_from ${args} 73 github.master_sites ${github.homepage}/releases/download/${git.branch} 62 74 } 63 75 } 64 76