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

Generalise #173

Merged
merged 5 commits into from
Jan 12, 2024
Merged

Generalise #173

merged 5 commits into from
Jan 12, 2024

Conversation

peaky76
Copy link
Contributor

@peaky76 peaky76 commented Jan 12, 2024

The reason dobby worked with other languages is because of L59 in lib/utils/bump.rb. Files like package.json and pyproject.toml were matching on the second part of the condition - the semver regex. It just so happened that in these files the first match is usually an app version number, but it's not guaranteed.

This PR generalises and strengthens the regex matching. Now a match on just a version number will not work. Instead it matches on case insensitive "version" followed by a combo of spaces and a ":" or "=" separator, followed by a version number. This will hopefully make this more robust for python and js (and possibly other languages that version in a similar way).

@peaky76 peaky76 requested a review from a team as a code owner January 12, 2024 14:38
addersuk
addersuk previously approved these changes Jan 12, 2024
@peaky76
Copy link
Contributor Author

peaky76 commented Jan 12, 2024

Found an edge case from looking at version-forget-me-not tests.

@peaky76 peaky76 merged commit 63f31d6 into master Jan 12, 2024
7 checks passed
@peaky76 peaky76 deleted the generalise branch January 12, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants