dev-cmd/bump-formula-pr: replace partial version in URL #16904
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For now, restrict to partial version excluding the last part, i.e. version with major.minor.patch will result in attempting to replace any occurrences of "/#{major}.#{minor}/" or "/v#{major}.#{minor}/".
This should take care of common situations like GNOME, KDE, and SourceForge URLs. It should also help with URLs like
util-linux
.It may result in incorrect replacements if URL has partial version based on another versioning scheme like the API version or if there are some equivalent numbers in URL that happen to match
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Could go stricter or looser in restrictions. Not sure if any incorrect replacements yet.
This won't handle formulae like:
mysql
- https://cdn.mysql.com/Downloads/MySQL-8.3/mysql-boost-8.3.0.tar.gzrtf2latex2e
- https://downloads.sourceforge.net/project/rtf2latex2e/rtf2latex2e-unix/2-2/rtf2latex2e-2-2-3.tar.gzIf we do hit incorrect replacements, we could test out multiple options for
url
. In case ofmirror
, we would still need to guess as these don't always exist at time of bump.