From 055ca9726f04b19076b7e503150765a44a70fe9a Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Wed, 28 Feb 2024 22:23:35 +0100 Subject: [PATCH] New Version ">", ">=" operators --- src/semantic_versioning.ads | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/semantic_versioning.ads b/src/semantic_versioning.ads index 47a8df3..276f51f 100644 --- a/src/semantic_versioning.ads +++ b/src/semantic_versioning.ads @@ -66,6 +66,15 @@ package Semantic_Versioning with Preelaborate is function "=" (L, R : Version) return Boolean; -- Conforming to Semver spec, the build metadata is not included in the comparison. + function ">" (L, R : Version) return Boolean + is (not (L < R or else L = R)); + + function "<=" (L, R : Version) return Boolean + is (not (L > R)); + + function ">=" (L, R : Version) return Boolean + is (not (L < R)); + function Major (V : Version) return Point; function Minor (V : Version) return Point; function Patch (V : Version) return Point;