Skip to content

fix: Wrong current release version captured when patch has more than one digit - #448

Merged
danth merged 4 commits into
masterfrom
unknown repository
Jun 1, 2022
Merged

danth merged 4 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented May 27, 2022 •

Copy link
Copy Markdown

Version in init file: 0.0.24-beta.0
Detected current release version: 0.0.24
Detected current version: 0.0.2
Generated new version: 0.0.3

Tested the current regex pattern in isolation against the above version and see that match[1] is stripping the 4 in the patch version

Logs:

debug: Parsing current version: path=PosixPath('src/analytics_calc/init.py') pattern='version *[:=] *"'["']' num_matches=1
debug: Regex matched version: 0.0.24
debug: get_current_version_by_config_file -> 0.0.24
debug: get_current_release_version_by_commits()
debug: Checking commit 19569b7cf15c3d21c7ed45dc335a386aed4d997e
debug: Checking commit 32ae4df6ee88c31e145f5109aa89c782c1c4795c
debug: Checking commit ccee325f58b449cdce1e623313efe7e1bbe6657d
debug: Checking commit 9a951310467c011f7050efead12059a5ce8537bc
debug: Checking commit c22ae08de4193e9c450d3d24fd07722d1a10fe6f
debug: Checking commit f453ba3f1e76e6d62c5a49ddc15f475401d8d66d
debug: Version matches regex 0.0.24-beta.0
debug:
debug: Automatically generated by python-semantic-release
debug: get_current_release_version_by_commits -> 0.0.2
Current version: 0.0.24, Current release version: 0.0.2
debug: evaluate_version_bump('0.0.24', 'patch')
debug: evaluate_version_bump -> patch
debug: get_new_version('0.0.24', '0.0.2', 'patch', True)

@ghost ghost changed the title Version increment wrong when last release patch has more than one digit fix: Wrong current release version captured when patch has more than one digit May 27, 2022
@ghost
ghost marked this pull request as draft May 27, 2022 16:36
Comment thread tests/history/test_version.py Resolved
Comment thread tests/history/test_version.py Resolved
@ghost
ghost marked this pull request as ready for review May 27, 2022 18:23
@ghost

ghost commented May 31, 2022

Copy link
Copy Markdown
Author

@jacksbox Since you have the most context here can you take a look?

@danth
danth merged commit 426cdc7 into python-semantic-release:master Jun 1, 2022
@ghost
ghost deleted the release-version-match branch June 1, 2022 13:26
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