Merge pull request #15975 from iMichka/tf

terraform: add audit for relicensing
This commit is contained in:
Mike McQuaid 2023-09-06 22:09:59 -04:00 committed by GitHub
commit 12c8778af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -497,6 +497,17 @@ module Homebrew
"They must not be upgraded to version 7.11 or newer." "They must not be upgraded to version 7.11 or newer."
end end
TERRAFORM_RELICENSED_VERSION = "1.6"
def audit_terraform
return if formula.name != "terraform"
return unless @core_tap
return if formula.version < Version.new(TERRAFORM_RELICENSED_VERSION)
problem "Terraform was relicensed to a non-open-source license from version 1.6. " \
"It must not be upgraded to version 1.6 or newer."
end
def audit_keg_only_reason def audit_keg_only_reason
return unless @core_tap return unless @core_tap
return unless formula.keg_only? return unless formula.keg_only?