From b8d60c7fd6269aca252d56c4109d2e59cd60fdda Mon Sep 17 00:00:00 2001 From: Kevin Abel Date: Sun, 11 Apr 2021 14:15:27 -0500 Subject: [PATCH] bottle: Restore old filename for non-GitHub package URLs The fix for #11090 in bd3f1d28e78bbc3e632b5439f001c6a2b3032fd9 changed the bottle json content but the downloader still expects bottles at the old location. --- Library/Homebrew/dev-cmd/bottle.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 1d2b63e914..a692cada40 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -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,