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

bump-formula-pr: Only delete Linux bottle line if it exists #7035

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions Library/Homebrew/dev-cmd/bump-formula-pr.rb
Expand Up @@ -256,10 +256,11 @@ def bump_formula_pr
]
end

# When bumping a linux-only formula,
# one needs to also delete the sha256 linux bottle line.
# That's because of running test-bot with --keep-old option in linuxbrew-core.
if formula.path.read.include?("depends_on :linux")
# When bumping a linux-only formula, one needs to also delete the
# sha256 linux bottle line if it exists. That's because of running
# test-bot with --keep-old option in linuxbrew-core.
formula_contents = formula.path.read
if formula_contents.include?("depends_on :linux") && formula_contents.include?("=> :x86_64_linux")
replacement_pairs << [
/^ sha256 ".+" => :x86_64_linux\n/m,
"\\2",
Expand Down