Skip to content

Handle pre-release versions - #95

Merged
Sharpie merged 1 commit into
OpenVoxProject:mainfrom
Sharpie:handle-semver-pre-release
Jul 15, 2026
Merged

Handle pre-release versions#95
Sharpie merged 1 commit into
OpenVoxProject:mainfrom
Sharpie:handle-semver-pre-release

Conversation

@Sharpie

@Sharpie Sharpie commented Jul 15, 2026

Copy link
Copy Markdown
Member

Short description

This commit updates the logic that generates package versions from Git tags. If the tag matches a semver.org pre-release with "alpha", "beta" or "rc" as the pre-release identifier, then the "-" in the version string is substituted for "~". That is, a tag like 9.0.0-beta1 becomes the following package version: 9.0.0~beta1

This is done because the dpkg and rpm package managers treat ~ specially and sort any version strings containing it before all other strings. This changes allows a 9.0.0~alpha1 package to upgrade to 9.0.0~beta1, and then to 9.0.0~rc0, and finally to 9.0.0.

See: https://semver.org
See: https://manpages.debian.org/bookworm/dpkg-dev/deb-version.7.en.html#Sorting_algorithm
See: https://rpm.org/docs/6.0.x/man/rpm-version.7#Comparing

Checklist

I have:

This commit updates the logic that generates package versions from Git
tags. If the tag matches a semver.org pre-release with "alpha", "beta"
or "rc" as the pre-release identifier, then the "-" in the version
string is substituted for "~". That is, a tag like `9.0.0-beta1` becomes
the following package version: `9.0.0~beta1`

This is done because the `dpkg` and `rpm` package managers treat `~`
specially and sort any version strings containing it before all other
strings. This changes allows a `9.0.0~alpha1` package to upgrade to
`9.0.0~beta1`, and then to `9.0.0~rc0`, and finally to `9.0.0`.

See: https://semver.org
See: https://manpages.debian.org/bookworm/dpkg-dev/deb-version.7.en.html#Sorting_algorithm
See: https://rpm.org/docs/6.0.x/man/rpm-version.7#Comparing

Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
@bastelfreak bastelfreak added the enhancement New feature or request label Jul 15, 2026
@Sharpie
Sharpie merged commit ce43909 into OpenVoxProject:main Jul 15, 2026
7 checks passed
@Sharpie
Sharpie deleted the handle-semver-pre-release branch July 15, 2026 14:12
Sharpie added a commit to OpenVoxProject/shared-actions that referenced this pull request Jul 15, 2026
PR OpenVoxProject/vanagon#95 updated Vanagon's handling of Git tags.
If the tag matches a semver.org pre-release with "alpha", "beta" or "rc" as
the pre-release identifier, then the "-" in the version string is
substituted for "~". That is, a tag like `9.0.0-beta1` becomes the
following package version: `9.0.0~beta1`

This is done because the `dpkg` and `rpm` package managers treat `~`
specially and sort any version strings containing it before all other
strings. This changes allows a `9.0.0~alpha1` package to upgrade to
`9.0.0~beta1`, and then to `9.0.0~rc0`, and finally to `9.0.0`.

This commit updates the munging logic in the `build_vanagon.yml`
workflow to correctly pass these versions to `rake vox:upload`.

See: https://semver.org
See: https://manpages.debian.org/bookworm/dpkg-dev/deb-version.7.en.html#Sorting_algorithm
See: https://rpm.org/docs/6.0.x/man/rpm-version.7#Comparing

Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
Sharpie added a commit to OpenVoxProject/openvox-release-infra that referenced this pull request Jul 15, 2026
This commit expands the regex used to validate package versions to allow
the tilde, `~`, character. The `dpkg` and `rpm` package managers use
the tilde to denote a pre-release version is eligible for upgrade to
a final release.

PR OpenVoxProject/vanagon#95 updated Vanagon to insert the tilde in
package versions in order to build SemVer tags like `9.0.0-beta1`
as a package with version `9.0.0~beta1`.

Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants