Skip to content

[feat] bundler(deb): Allow debian pre-release versioning #14869

@ho-ho-ho

Description

@ho-ho-ho

Describe the problem

I've stumbled upon this small debian "anomaly" where their versioning is not 100% compatible with semver:
debian uses the tilde character for pre-releases and SemVer uses a colon

so if we take the versions in the SemVer example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0
for the same versions, debian ordering would be 1.0.0 < 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1

Describe the solution you'd like

Replacing the first colon (since SemVer allows multiple to appear) with a tilde (most likely in the deb bundling process since it doesn't seem to affect other parts).

The result for the above example is: 1.0.0~alpha < 1.0.0~alpha.1 < 1.0.0~alpha.beta < 1.0.0~beta < 1.0.0~beta.2 < 1.0.0~beta.11 < 1.0.0~rc.1 < 1.0.0, the desired order.

Alternatives considered

Leave it as is - after all it's a somewhat niche problem to have (usage of pre-versioning may not be as widespread).

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions