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: handle additional edge cases #9475

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

EricFromCanada
Copy link
Member

@EricFromCanada EricFromCanada commented Dec 9, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

Allow bump-formula-pr to work with formulae that:

  • use a URL that specifies only a revision, and a version (e.g. acme, colortail, pytouhou)
    brew bump-formula-pr -f -n acme --version=0.98 --revision=277
  • use a repository URL providing an autodetected version (e.g. smpeg)
    brew bump-formula-pr -f -n smpeg --url=svn://svn.icculus.org/smpeg/tags/release_0_4_6/ --revision=400

Fixes #9462.

Currently exposes an issue with formulae that specify the revision as an integer rather than a string, i.e. fuego, netpbm, spim. (Update: addressed in Homebrew/homebrew-core#66558)

$ brew bump-formula-pr -f -n spim --version=9.2 --revision=800
==> replace 732 with "800"
Error: wrong argument type Integer (expected Regexp)
/usr/local/Homebrew/Library/Homebrew/utils/string_inreplace_extension.rb:36:in `gsub!'
/usr/local/Homebrew/Library/Homebrew/utils/string_inreplace_extension.rb:36:in `gsub!'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:78:in `block in inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:71:in `each'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:71:in `inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:332:in `bump_formula_pr'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'

@BrewTestBot
Copy link
Member

Review period will end on 2020-12-10 at 03:16:03 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Dec 9, 2020
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Nice catch again!

Library/Homebrew/dev-cmd/bump-formula-pr.rb Outdated Show resolved Hide resolved
@BrewTestBot
Copy link
Member

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Dec 10, 2020
@MikeMcQuaid MikeMcQuaid merged commit aa7d7a1 into Homebrew:master Dec 10, 2020
@EricFromCanada EricFromCanada deleted the bump-edge-cases branch December 10, 2020 16:50
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 10, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bump-formula-pr Error: undefined method `gsub' for nil:NilClass
3 participants