terraform: add audit for relicensing

See also
https://github.com/Homebrew/homebrew-core/pull/139538
This commit is contained in:
Michka Popoff 2023-09-06 21:26:39 +02:00
parent d5d74788b2
commit a24d15d942
No known key found for this signature in database
GPG Key ID: 033D03F151030611

View File

@ -497,6 +497,17 @@ module Homebrew
"They must not be upgraded to version 7.11 or newer."
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
return unless @core_tap
return unless formula.keg_only?