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