Commit 0af3e486 authored by Eric Timmons's avatar Eric Timmons

Support for semver sorting

parent aec0350c
......@@ -11,7 +11,8 @@
#:clpi/release
#:clpi/repos
#:clpi/utils)
(:export #:project))
(:export #:project)
(:import-from #:cl-semver))
(in-package #:clpi/project)
......@@ -188,7 +189,12 @@ instantiated."))
(when version-scheme
(setf release-descs (sort release-descs (ecase version-scheme
(:date
#'string<))
#'string<)
(:semver
(lambda (x y)
(cl-semver:version<
(cl-semver:read-version-from-string x)
(cl-semver:read-version-from-string y)))))
:key #'car)))
(with-clpi-io-syntax ()
(dolist (release-desc release-descs)
......@@ -205,7 +211,12 @@ instantiated."))
(when version-scheme
(setf release-descs (sort release-descs (ecase version-scheme
(:date
#'string<))
#'string<)
(:semver
(lambda (x y)
(cl-semver:version<
(cl-semver:read-version-from-string x)
(cl-semver:read-version-from-string y)))))
:key #'car)))
(with-clpi-io-syntax ()
(dolist (release-desc release-descs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment