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

Avoid non-monotonic versions #1087

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

danchr
Copy link
Contributor

@danchr danchr commented Nov 18, 2024

Using the release-branch-semver scheme, a commit five nodes off e.g. 1.0.0 will get 1.1.0dev5, but a commit four nodes off 1.0.1 will get 1.1.0dev4, despite it being more commits from 1.0.0. To fix this, we add a factor that we use for bumping the distance based on the micro release we're discarding. The default is 1000; for most projects, that should be plenty of commits per bug-fix release.

Fixes #1025.

@@ -32,7 +32,12 @@ def wd(wd: WorkDir) -> WorkDir:
archival_mapping = {
"1.0": {"tag": "1.0"},
"1.1.0.dev3+h000000000000": {
"latesttag": "1.0",
"latesttag": "1.0.0",
"latesttagdistance": "3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i need some more examples, i cant quite wrap my head around it

this is a orkaround to ease the pain, but its also unable to completely prevent it

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.

Non-monotonic development versions with release branch scheme
2 participants