From f350f678ceee9b90eceb8cd56f670a4586231d32 Mon Sep 17 00:00:00 2001 From: Andy Davidoff Date: Sat, 14 Dec 2019 19:06:53 -0500 Subject: [PATCH] 1.8.16: fix stupid cmp --- bump.nim | 8 +------- bump.nimble | 2 +- tests/tbump.nim | 3 +++ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bump.nim b/bump.nim index d461e33..557060f 100644 --- a/bump.nim +++ b/bump.nim @@ -171,12 +171,6 @@ proc isValid*(ver: Version): bool = ## true if the version seems legit result = ver.major > 0'u or ver.minor > 0'u or ver.patch > 0'u -proc `>`*(a, b: Version): bool {.inline.} = - result = a.major > b.major or a.minor > b.minor or a.patch > b.patch - -proc `==`*(a, b: Version): bool {.inline.} = - result = a.major == b.major and a.minor == b.minor and a.patch == b.patch - proc parseVersion*(nimble: string): Option[Version] = ## try to parse a version from any line in a .nimble; ## safe to use at compile-time @@ -652,4 +646,4 @@ when isMainModule: "release": "also use `hub` to issue a GitHub release", "log-level": "specify Nim logging level", "manual": "manually set the new version to #.#.#", - } \ No newline at end of file + } diff --git a/bump.nimble b/bump.nimble index 11e973a..a25be8b 100644 --- a/bump.nimble +++ b/bump.nimble @@ -1,4 +1,4 @@ -version = "1.8.15" +version = "1.8.16" author = "disruptek" description = "a tiny tool to bump nimble versions" license = "MIT" diff --git a/tests/tbump.nim b/tests/tbump.nim index 23ebe95..4774ef0 100644 --- a/tests/tbump.nim +++ b/tests/tbump.nim @@ -141,6 +141,9 @@ suite "bump": test "version comparison": check ver123 < ver155 check ver170 > ver123 + check ver171 > ver170 + check ver170 < ver171 + check ver456 > ver170 check ver170 != (1'u, 2'u, 3'u) check ver170 == (1'u, 7'u, 0'u) check ver170 <= (1'u, 7'u, 0'u)