Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils/shared_audits.rb: check version :all for non-cask formulae in the prerelease allowlist #9427

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Library/Homebrew/utils/shared_audits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def github_release_data(user, repo, tag)
"extraterm" => :all,
"freetube" => :all,
"gitless" => "0.8.8",
"gron" => :all,
"haptickey" => :all,
"home-assistant" => :all,
"lidarr" => :all,
Expand All @@ -59,11 +60,17 @@ def github_release(user, repo, tag, formula: nil, cask: nil)
end

if release["prerelease"]
return if formula && GITHUB_PRERELEASE_ALLOWLIST[formula.name] == formula.version
return if formula && (GITHUB_PRERELEASE_ALLOWLIST[formula.name] == formula.version ||
GITHUB_PRERELEASE_ALLOWLIST[formula.name] == :all)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably also fail if it's not a pre-release anymore but still in the GITHUB_PRERELEASE_ALLOWLIST like above.


return "#{tag} is a GitHub pre-release."
end

if !release["prerelease"] && ((formula && GITHUB_PRERELEASE_ALLOWLIST.key?(formula.name)) ||
(cask && GITHUB_PRERELEASE_ALLOWLIST[cask.token]))
return "#{tag} is not a GitHub pre-release but is expected to be."
end

return "#{tag} is a GitHub draft." if release["draft"]
end

Expand Down