-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for epochs in MQL's `semver` type. ```mql > semver("1:1.2.3") > semver("2009.1.2") true ``` This works for both deb/rpm-style epochs ("NN:version") and python-style epochs ([PEP440](https://peps.python.org/pep-0440/)). Additionally you can access the epoch: ```mql > semver("5:1.2.3").epoch 5 > semver("3!2.1").epoch 3 ``` You can compare versions with and without epochs as well: ```mql > semver("1:1.0") > semver("2009.12.03") true ``` Note: Technically epochs aren't semver, so the name `semver` is hitting its limit here. We could introduce the `version` type as a replacement or as a temporary holdover (because we also don't want to clutter the global namespace too much). Internal note: This required a new wrapper around the version, which can now be extended with more metadata. Currently we have the epoch stored. Signed-off-by: Dominik Richter <[email protected]>
- Loading branch information
Showing
5 changed files
with
224 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters