Skip to content

Github: Impose patch version restrictions for minor version increments - #199

Open
KasperThystrup wants to merge 8 commits into
devfrom
patch_increment_restriction
Open

Github: Impose patch version restrictions for minor version increments#199
KasperThystrup wants to merge 8 commits into
devfrom
patch_increment_restriction

Conversation

@KasperThystrup

@KasperThystrup KasperThystrup commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

When making relations between versions numerically (by first removing dot between minor and patch, then by removing the build entirely) every minor releases of 10 leads to ambiguity

Example:

2.20.0 SHOULD be greater than 2.2.0 - as in: 2.20.0 > 2.2.0 However 2.20.0 > 2.2.0 numerically becomes 2.200 > 2.20 which is FALSE -> it is rather 2.200 == 2.20!

This is circumvented by always setting patch to 1 whenever a new minor is increments to a value of 10's, e.g. 2.19.+ minor version increments directly to 2.20.1 instead of 2.20.0.

Thus we can never get a situation where we get both a version 2.2.0 AND a version 2.20.0

When making relations between versions numerically (by first removing dot between minor and patch, then by removing the build entirely) every minor releases of 10 leads to ambiguity

Example:
2.20.0 SHOULD be greater than 2.2.0 - as in: 2.20.0 > 2.2.0
However 2.20.0 < 2.2.0 numerically becomes 2.200 < 2.20 which is FALSE (it is rather 2.200 == 2.20)

This is now circumvented by always setting patch to 1 whenever a new minor is incremented.
Now e.g. 2.19.+ minor version increments directly to 2.20.1

Thus we can never get a situation where we get both a version 2.2.0 AND a version 2.20.0
@KasperThystrup KasperThystrup changed the title Impose patch version restrictions for minor version increments Github: Impose patch version restrictions for minor version increments Aug 5, 2026
@github-actions github-actions Bot added the build Changes to installation and documentation files. Used for automation of version bumping label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

✅ Version label set to build

Increased delay from 30 seconds to 120 seconds for execution.
@KasperThystrup
KasperThystrup force-pushed the patch_increment_restriction branch from 154bcb6 to 449311b Compare August 5, 2026 11:22
@KasperThystrup
KasperThystrup force-pushed the patch_increment_restriction branch from dbe8865 to a503bd0 Compare August 5, 2026 11:30
@KasperThystrup
KasperThystrup force-pushed the patch_increment_restriction branch from a503bd0 to 698d96a Compare August 5, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Changes to installation and documentation files. Used for automation of version bumping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant