Prepare deprecations for the old bottle syntax
This commit is contained in:
parent
9e1f355257
commit
f68a3961c7
@ -2447,11 +2447,11 @@ class Formula
|
|||||||
#
|
#
|
||||||
# <pre>bottle do
|
# <pre>bottle do
|
||||||
# root_url "https://example.com" # Optional root to calculate bottle URLs.
|
# root_url "https://example.com" # Optional root to calculate bottle URLs.
|
||||||
# cellar "/opt/homebrew/Cellar" # Optional HOMEBREW_CELLAR in which the bottles were built.
|
|
||||||
# rebuild 1 # Marks the old bottle as outdated without bumping the version/revision of the formula.
|
# rebuild 1 # Marks the old bottle as outdated without bumping the version/revision of the formula.
|
||||||
# sha256 "ef65c759c5097a36323fa9c77756468649e8d1980a3a4e05695c05e39568967c" => :catalina
|
# # Optionally specify the HOMEBREW_CELLAR in which the bottles were built.
|
||||||
# sha256 "28f4090610946a4eb207df102d841de23ced0d06ba31cb79e040d883906dcd4f" => :mojave
|
# sha256 cellar: "/brew/Cellar", catalina: "ef65c759c5097a36323fa9c77756468649e8d1980a3a4e05695c05e39568967c"
|
||||||
# sha256 "91dd0caca9bd3f38c439d5a7b6f68440c4274945615fae035ff0a369264b8a2f" => :high_sierra
|
# sha256 cellar: :any, mojave: "28f4090610946a4eb207df102d841de23ced0d06ba31cb79e040d883906dcd4f"
|
||||||
|
# sha256 high_sierra: "91dd0caca9bd3f38c439d5a7b6f68440c4274945615fae035ff0a369264b8a2f"
|
||||||
# end</pre>
|
# end</pre>
|
||||||
#
|
#
|
||||||
# Homebrew maintainers aim to bottle all formulae that require compilation.
|
# Homebrew maintainers aim to bottle all formulae that require compilation.
|
||||||
|
@ -371,6 +371,14 @@ class BottleSpecification
|
|||||||
end
|
end
|
||||||
|
|
||||||
def cellar(val = nil)
|
def cellar(val = nil)
|
||||||
|
# TODO: (3.1) uncomment to deprecate the old bottle syntax
|
||||||
|
# if val.present?
|
||||||
|
# odeprecated(
|
||||||
|
# "`cellar` in a bottle block",
|
||||||
|
# "`brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument",
|
||||||
|
# )
|
||||||
|
# end
|
||||||
|
|
||||||
return collector.dig(Utils::Bottles.tag, :cellar) || @all_tags_cellar if val.nil?
|
return collector.dig(Utils::Bottles.tag, :cellar) || @all_tags_cellar if val.nil?
|
||||||
|
|
||||||
@all_tags_cellar = val
|
@all_tags_cellar = val
|
||||||
@ -422,6 +430,14 @@ class BottleSpecification
|
|||||||
digest, tag = hash.find do |key, value|
|
digest, tag = hash.find do |key, value|
|
||||||
key.is_a?(String) && value.is_a?(Symbol) && key.match?(sha256_regex)
|
key.is_a?(String) && value.is_a?(Symbol) && key.match?(sha256_regex)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: (3.1) uncomment to deprecate the old bottle syntax
|
||||||
|
# if digest && tag
|
||||||
|
# odeprecated(
|
||||||
|
# '`sha256 "digest" => :tag` in a bottle block',
|
||||||
|
# '`brew style --fix` on the formula to update the style or use `sha256 tag: "digest"`',
|
||||||
|
# )
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
cellar ||= all_tags_cellar
|
cellar ||= all_tags_cellar
|
||||||
|
Loading…
x
Reference in New Issue
Block a user