Commit dd3cec47 authored by Eric Timmons's avatar Eric Timmons
Browse files

Remove a very misleadingly named file

parent 60e5a029
;;;; Semantically versioned projects
;;;; Dotted versioned projects
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.
(uiop:define-package #:clpm/sources/semantic-versioned-project
(uiop:define-package #:clpm/sources/dotted-versioned-project
(:use #:cl
#:clpm/sources/defs
#:clpm/version-strings)
(:export #:semantic-versioned-release
#:semantic-versioned-system-release))
(:export #:dotted-versioned-release
#:dotted-versioned-system-release))
(in-package #:clpm/sources/semantic-versioned-project)
(in-package #:clpm/sources/dotted-versioned-project)
(defclass semantic-versioned-release (clpm-release)
(defclass dotted-versioned-release (clpm-release)
())
(defmethod release-satisfies-version-spec-p ((release semantic-versioned-release)
(defmethod release-satisfies-version-spec-p ((release dotted-versioned-release)
version-spec)
(version-spec-satisfied-p/semantic version-spec (release-version release)))
(version-spec-satisfied-p/dotted version-spec (release-version release)))
(defmethod release-> ((release-1 semantic-versioned-release)
(release-2 semantic-versioned-release))
(defmethod release-> ((release-1 dotted-versioned-release)
(release-2 dotted-versioned-release))
(assert (eql (release-project release-1) (release-project release-2)))
(semantic-version< (release-version release-2)
(release-version release-1)))
(uiop:version< (release-version release-2)
(release-version release-1)))
(defclass semantic-versioned-system-release (clpm-system-release)
(defclass dotted-versioned-system-release (clpm-system-release)
())
(defmethod system-release-satisfies-version-spec-p ((system-release semantic-versioned-system-release)
(defmethod system-release-satisfies-version-spec-p ((system-release dotted-versioned-system-release)
version-spec)
(let ((system-version (system-release-system-version system-release)))
(cond
((null version-spec)
t)
(system-version
(version-spec-satisfied-p/semantic version-spec system-version))
(version-spec-satisfied-p/dotted version-spec system-version))
(t
nil))))
(defmethod system-release-> ((system-release-1 semantic-versioned-system-release)
(system-release-2 semantic-versioned-system-release))
(semantic-version< (system-release-system-version system-release-2)
(system-release-system-version system-release-1)))
(defmethod system-release-> ((system-release-1 dotted-versioned-system-release)
(system-release-2 dotted-versioned-system-release))
(uiop:version< (system-release-system-version system-release-2)
(system-release-system-version system-release-1)))
......@@ -12,7 +12,7 @@
#:clpm/install/defs
#:clpm/requirement
#:clpm/sources/defs
#:clpm/sources/semantic-versioned-project)
#:clpm/sources/dotted-versioned-project)
(:export #:fs-source
#:fs-source-from-form
#:fs-source-register-asd
......@@ -321,7 +321,7 @@ contains."
;; * System release
(defclass fs-system-release (semantic-versioned-system-release clpm-system-release)
(defclass fs-system-release (dotted-versioned-system-release clpm-system-release)
((source
:initarg :source
:accessor system-release-source)
......
......@@ -13,6 +13,7 @@
#:parse-version-string
#:semantic-version<
#:semantic-version<=
#:version-spec-satisfied-p/dotted
#:version-spec-satisfied-p/simple-string
#:version-spec-satisfied-p/semantic))
......@@ -162,9 +163,27 @@ by the character used to separate the segments."
(defun semantic-version<= (version1 version2)
(not (semantic-version< version2 version1)))
(defun version< (version-1 version-2)
(check-type version-1 (or string list))
(check-type version-2 (or string list)))
(defun version-spec-satisfied-p/dotted-1 (spec version)
(destructuring-bind (test version-spec)
spec
(ecase test
(=
(and (uiop:version<= version-spec version)
(uiop:version<= version version-spec)))
(<=
(uiop:version<= version version-spec))
(<
(uiop:version< version version-spec))
(>=
(uiop:version<= version-spec version))
(>
(uiop:version< version-spec version))
(/=
(or (uiop:version< version-spec version)
(uiop:version< version version-spec))))))
(defun version-spec-satisfied-p/dotted (spec version)
(every (rcurry #'version-spec-satisfied-p/dotted-1 version) spec))
(defun version-spec-satisfied-p/semantic-1 (spec version)
(destructuring-bind (test version-spec)
......
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