Merge pull request #11106 from kabel/bugfix/non-ghp-bottle-filename

bottle: Restore old filename for non-GitHub package URLs
This commit is contained in:
Mike McQuaid 2021-04-12 08:51:22 +01:00 committed by GitHub
commit 8b38d962ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -507,6 +507,12 @@ module Homebrew
return unless args.json?
bottle_filename = if bottle.root_url.match?(GitHubPackages::URL_REGEX)
filename.github_packages
else
filename.bintray
end
json = {
f.full_name => {
"formula" => {
@ -532,7 +538,7 @@ module Homebrew
"date" => Pathname(local_filename).mtime.strftime("%F"),
"tags" => {
bottle_tag.to_s => {
"filename" => filename.github_packages,
"filename" => bottle_filename,
"local_filename" => local_filename,
"sha256" => sha256,
"formulae_brew_sh_path" => formulae_brew_sh_path,