Why brew bump-formula-pr raises “version_schemes should only increment by 1” when a version scheme is not changed

I’m trying to create a PR for a newly released version and see the following:

$ brew bump-formula-pr --strict --tag=0.8.0 --revision=7a5bd5b3a318aeba568f7b467d7364699e6160fb elegant-git
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

==> replace "0.7.0" with "0.8.0"
==> replace "5fc093508a8337a8c60c1b339ea2d93201ee357e" with "7a5bd5b3a318aeba568f7b467d7364699e6160fb"
bees-hive/hive/elegant-git:
  * version_schemes should only increment by 1
Error: 1 problem in 1 formula detected
Error: brew audit failed!

From the official documentation:

if we want to change version scheme from one to another, then we may need to update version_scheme of this Formula to be able to use new version scheme.

As I don’t change the versioning scheme, it should work. But there is an error. Why does this happen? And any ideas on how to fix it?

P.S. Initially, posted on https://stackoverflow.com/q/58181547/10418734

It might be a bug in the audit since homebrew-core never had to bump version schemes more than once.

2 Likes

Yes, this is exactly the case. See these lines:

It’s unclear why the logic is different from the revision code below:

A pull request to fix this would be welcome.

1 Like