SemVersion: fix operators >/<

master
Harald Wolff 2020-12-09 13:00:22 +01:00
parent 0e17216cc9
commit 1b922b8096
1 changed files with 8 additions and 0 deletions

View File

@ -2,8 +2,10 @@
using System;
using System.IO;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Text.RegularExpressions;
using Jint.Parser.Ast;
using ln.build.semver;
using Microsoft.VisualBasic;
@ -81,6 +83,9 @@ namespace ln.build.semver
public static bool operator <(SemVersion a,SemVersion b)
{
if (a is null || b is null)
return false;
if (a.Major < b.Major)
return true;
if (a.Major > b.Major)
@ -108,6 +113,9 @@ namespace ln.build.semver
}
public static bool operator >(SemVersion b,SemVersion a)
{
if (a is null || b is null)
return false;
if (a.Major < b.Major)
return true;
if (a.Major > b.Major)