all repos — min @ 0daa8ff769fd1e273bb0c3ee1e3d16156f98934f

A small but practical concatenative programming language.

Fixed semver inc symbols
h3rald h3rald@h3rald.com
Tue, 15 Dec 2020 02:29:36 +0100
commit

0daa8ff769fd1e273bb0c3ee1e3d16156f98934f

parent

7f43e678e7a4df645350921998264c56f51207ab

3 files changed, 6 insertions(+), 2 deletions(-)

jump to
M lib/min_str.nimlib/min_str.nim

@@ -191,6 +191,8 @@ var d = i.pop

let cv = i.dget(d, "major") let v = cv.intVal + 1 i.dset(d, "major", v.newVal) + i.dset(d, "minor", 0.newVal) + i.dset(d, "patch", 0.newVal) i.push(d) i.push("to-semver".newSym)

@@ -200,6 +202,7 @@ var d = i.pop

let cv = i.dget(d, "minor") let v = cv.intVal + 1 i.dset(d, "minor", v.newVal) + i.dset(d, "patch", 0.newVal) i.push(d) i.push("to-semver".newSym)
M next-release.mdnext-release.md

@@ -1,3 +1,4 @@

* Added support for sigils on double-quoted strings. * Added support for arbitrary strings as dictionary keys. * Added **define-sigil**, **delete-sigil**, **seal-sigil**, **unseal-sigil**, **defined-sigil?**. +* Fixed behavior of **semver-inc-mahor** and **semver-inc-minor** to set lower digits to zero.
M tests/str.mintests/str.min

@@ -59,9 +59,9 @@ ("1.2.3" from-semver {1 :major 2 :minor 3 :patch} ==) assert

({2 :major 25 :minor 300 :patch} to-semver "2.25.300" ==) assert - ("2.3.6" semver-inc-major "3.3.6" ==) assert + ("2.3.6" semver-inc-major "3.0.0" ==) assert - ("2.3.6" semver-inc-minor "2.4.6" ==) assert + ("2.3.6" semver-inc-minor "2.4.0" ==) assert ("2.3.6" semver-inc-patch "2.3.7" ==) assert