Merge pull request #7235 from GauthamGoli/argv-cleanup-16

ARGV: Deprecate ARGV.build_stable?
This commit is contained in:
Mike McQuaid 2020-03-29 19:55:41 +01:00 committed by GitHub
commit ef12e329a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -154,6 +154,10 @@ module Homebrew
end end
end end
def build_stable?
!(HEAD? || devel?)
end
private private
def downcased_unique_named def downcased_unique_named

View File

@ -292,7 +292,7 @@ module Homebrew
unversioned_name = unversioned_formula.basename(".rb") unversioned_name = unversioned_formula.basename(".rb")
problem "#{formula} is versioned but no #{unversioned_name} formula exists" problem "#{formula} is versioned but no #{unversioned_name} formula exists"
end end
elsif ARGV.build_stable? && formula.stable? && elsif Homebrew.args.build_stable? && formula.stable? &&
!(versioned_formulae = formula.versioned_formulae).empty? !(versioned_formulae = formula.versioned_formulae).empty?
versioned_aliases = formula.aliases.grep(/.@\d/) versioned_aliases = formula.aliases.grep(/.@\d/)
_, last_alias_version = versioned_formulae.map(&:name).last.split("@") _, last_alias_version = versioned_formulae.map(&:name).last.split("@")

View File

@ -43,10 +43,6 @@ module HomebrewArgvExtension
include?("--no-sandbox") || !ENV["HOMEBREW_NO_SANDBOX"].nil? include?("--no-sandbox") || !ENV["HOMEBREW_NO_SANDBOX"].nil?
end end
def build_stable?
!(include?("--HEAD") || include?("--devel"))
end
def build_bottle? def build_bottle?
include?("--build-bottle") include?("--build-bottle")
end end