Rename download-strategy to root-url-using
This commit is contained in:
parent
76607bbb6f
commit
ffbabfd238
@ -16,8 +16,8 @@ BOTTLE_ERB = <<-EOS
|
||||
bottle do
|
||||
<% if [HOMEBREW_BOTTLE_DEFAULT_DOMAIN.to_s,
|
||||
"#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles"].exclude?(root_url) %>
|
||||
root_url "<%= root_url %>"<% if download_strategy.present? %>,
|
||||
using: <%= download_strategy %>
|
||||
root_url "<%= root_url %>"<% if root_url_using.present? %>,
|
||||
using: <%= root_url_using %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if rebuild.positive? %>
|
||||
@ -77,8 +77,8 @@ module Homebrew
|
||||
description: "Specify a committer name and email in `git`'s standard author format."
|
||||
flag "--root-url=",
|
||||
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
|
||||
flag "--download-strategy=",
|
||||
description: "Use the specified download strategy for the root_url in the generated DSL"
|
||||
flag "--root-url-using=",
|
||||
description: "Use the specified download strategy for the root_url in the generated DSL via `using:' arg"
|
||||
|
||||
conflicts "--no-rebuild", "--keep-old"
|
||||
|
||||
@ -225,7 +225,7 @@ module Homebrew
|
||||
%Q(#{line}"#{digest}")
|
||||
end
|
||||
|
||||
def bottle_output(bottle, download_strategy)
|
||||
def bottle_output(bottle, root_url_using)
|
||||
cellars = bottle.checksums.map do |checksum|
|
||||
cellar = checksum["cellar"]
|
||||
next unless cellar_parameter_needed? cellar
|
||||
@ -248,7 +248,7 @@ module Homebrew
|
||||
end
|
||||
erb_binding = bottle.instance_eval { binding }
|
||||
erb_binding.local_variable_set(:sha256_lines, sha256_lines)
|
||||
erb_binding.local_variable_set(:download_strategy, download_strategy)
|
||||
erb_binding.local_variable_set(:root_url_using, root_url_using)
|
||||
erb = ERB.new BOTTLE_ERB
|
||||
erb.result(erb_binding).gsub(/^\s*$\n/, "")
|
||||
end
|
||||
@ -534,7 +534,7 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
output = bottle_output(bottle, args.download_strategy)
|
||||
output = bottle_output(bottle, args.root_url_using)
|
||||
|
||||
puts "./#{local_filename}"
|
||||
puts output
|
||||
@ -646,7 +646,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
unless args.write?
|
||||
puts bottle_output(bottle, args.download_strategy)
|
||||
puts bottle_output(bottle, args.root_url_using)
|
||||
next
|
||||
end
|
||||
|
||||
@ -725,7 +725,7 @@ module Homebrew
|
||||
update_or_add = checksums.nil? ? "add" : "update"
|
||||
|
||||
checksums&.each(&bottle.method(:sha256))
|
||||
output = bottle_output(bottle, args.download_strategy)
|
||||
output = bottle_output(bottle, args.root_url_using)
|
||||
puts output
|
||||
|
||||
case update_or_add
|
||||
|
||||
@ -61,8 +61,8 @@ module Homebrew
|
||||
description: "Target tap repository (default: `homebrew/core`)."
|
||||
flag "--root-url=",
|
||||
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
|
||||
flag "--download-strategy=",
|
||||
description: "Use the specified download strategy for the root_url in the generated DSL"
|
||||
flag "--root-url-using=",
|
||||
description: "Use the specified download strategy for the root_url in the generated DSL via `using:' arg"
|
||||
flag "--bintray-mirror=",
|
||||
description: "Use the specified Bintray repository to automatically mirror stable URLs "\
|
||||
"defined in the formulae (default: `mirror`)."
|
||||
@ -445,7 +445,7 @@ module Homebrew
|
||||
upload_args << "--warn-on-upload-failure" if args.warn_on_upload_failure?
|
||||
upload_args << "--committer=#{args.committer}" if args.committer
|
||||
upload_args << "--root-url=#{args.root_url}" if args.root_url
|
||||
upload_args << "--download-strategy=#{args.download_strategy}" if args.download_strategy
|
||||
upload_args << "--root-url-using=#{args.root_url_using}" if args.root_url_using
|
||||
upload_args << if archive_item.present?
|
||||
"--archive-item=#{archive_item}"
|
||||
else
|
||||
|
||||
@ -40,8 +40,8 @@ module Homebrew
|
||||
description: "Upload to the specified GitHub organisation's GitHub Packages (default: `homebrew`)."
|
||||
flag "--root-url=",
|
||||
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
|
||||
flag "--download-strategy=",
|
||||
description: "Use the specified download strategy for the root_url in the generated DSL"
|
||||
flag "--root-url-using=",
|
||||
description: "Use the specified download strategy for the root_url in the generated DSL via `using:' arg"
|
||||
|
||||
named_args :none
|
||||
end
|
||||
@ -116,7 +116,7 @@ module Homebrew
|
||||
bottle_args << "--root-url=#{args.root_url}" if args.root_url
|
||||
bottle_args << "--committer=#{args.committer}" if args.committer
|
||||
bottle_args << "--no-commit" if args.no_commit?
|
||||
bottle_args << "--download-strategy=#{args.download_strategy}" if args.download_strategy
|
||||
bottle_args << "--root-url-using=#{args.root_url_using}" if args.root_url_using
|
||||
bottle_args += json_files
|
||||
|
||||
if args.dry_run?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user