Skip to content

Commit

Permalink
resource_auditor: also check versions based on bottle root_url.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Sep 6, 2023
1 parent 0ae29cc commit 31b94e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Library/Homebrew/resource_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def audit
def audit_version
if version.nil?
problem "missing version"
elsif owner.is_a?(Formula) && owner.core_formula? && !version.to_s.match?(GitHubPackages::VALID_OCI_TAG_REGEX)
elsif owner.is_a?(Formula) && !version.to_s.match?(GitHubPackages::VALID_OCI_TAG_REGEX) &&
(owner.core_formula? ||
(owner.bottle_defined? && GitHubPackages::URL_REGEX.match?(owner.bottle_specification.root_url)))
problem "version #{version} does not match #{GitHubPackages::VALID_OCI_TAG_REGEX.source}"
elsif !version.detected_from_url?
version_text = version
Expand Down

0 comments on commit 31b94e2

Please sign in to comment.