Skip to content

fix(cmd-version): fix handling of multiple prerelease token variants & git flow merges #1120

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

Conversation

codejedi365
Copy link
Contributor

@codejedi365 codejedi365 commented Dec 9, 2024

Purpose

Rationale

I first introduced the proper git flow repository builders and then found that PSR failed to determine the proper version at the key release points of Git Flow. I got it working by fixing the latest version determination component to only consider prerelease versions that were of equivalent prerelease token values. While I was refactoring I did improve the performance by removing the complex for loops and instead used functional programming list filtering and set's to perform O(1) lookups.

How did you test?

Enabled the git flow repo rebuild tests which ensure that PSR will accurately version when merges are made from dev -> beta -> main

@codejedi365 codejedi365 linked an issue Dec 9, 2024 that may be closed by this pull request
@codejedi365 codejedi365 force-pushed the fix/multiple-prerelease-token-mgmt branch from 980c664 to 6534d31 Compare December 9, 2024 08:57
@codejedi365 codejedi365 force-pushed the fix/multiple-prerelease-token-mgmt branch from 6534d31 to 6610d85 Compare December 15, 2024 00:46
In the case where there are alpha and beta releases, we must only
consider the previous beta release even if alpha releases exist
due to merging into beta release only branches which have no changes
considerable changes from alphas but must be marked otherwise.

Resolves: python-semantic-release#789
@codejedi365 codejedi365 force-pushed the fix/multiple-prerelease-token-mgmt branch from 98fc20b to efae6c3 Compare December 15, 2024 01:37
@codejedi365 codejedi365 merged commit 8784b9a into python-semantic-release:master Dec 15, 2024
12 checks passed
@codejedi365 codejedi365 deleted the fix/multiple-prerelease-token-mgmt branch December 15, 2024 03:53
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.

fix: version determination of 4 branch GitFlow repo
1 participant