Verified Commit 37098eb7 authored by Eric Timmons's avatar Eric Timmons
Browse files

Allow DEFAULT-VERSION to contain two integers

This makes guidance on how to version local edits more clear.
parent 6cf640b2
Pipeline #5401 passed with stage
......@@ -1826,7 +1826,8 @@ The second segment is optional and contains pre-release
information. If present, the pre-release segment must be separated
from the first by a @code{#\-} character. This segment consists of a
``category'' (@code{alpha}, @code{beta}, or @code{rc}), optionally
followed by @code{#\.} character and a non-negative integer.
followed by one or two non-negative integers, separated from the
catagory and easch other by a @code{#\.} character.
Examples of valid specifiers include:
......
......@@ -314,8 +314,8 @@ If VERSION-STRING is otherwise invalid, a VERSION-STRING-INVALID-ERROR is signal
(:documentation
"A version specifier that parses and orders identically to
SEMANTIC-VERSION. However, no build metadata is allowed and the pre-release
segment can consist of at most two identifiers. The first must be \"alpha\",
\"beta\", or \"rc\". The second must be an integer."))
segment can consist of at most three identifiers. The first must be \"alpha\",
\"beta\", or \"rc\". The second and third (if they exist) must be integers."))
(defmethod initialize-instance :after ((version default-version) &key version-string)
(with-slots (pre-release-segment build-metadata-segment) version
......@@ -325,16 +325,12 @@ segment can consist of at most two identifiers. The first must be \"alpha\",
(unless (null build-metadata-segment)
(invalid "The build metadata segment must not exist."))
(unless (or (null pre-release-segment)
(and (= 1 (length pre-release-segment))
(or (equal "alpha" (first pre-release-segment))
(equal "beta" (first pre-release-segment))
(equal "rc" (first pre-release-segment))))
(and (= 2 (length pre-release-segment))
(and (<= (length pre-release-segment) 3)
(or (equal "alpha" (first pre-release-segment))
(equal "beta" (first pre-release-segment))
(equal "rc" (first pre-release-segment)))
(integerp (second pre-release-segment))))
(invalid "The pre-release segment must be absent or consist of \"alpha\", \"beta\", or \"rc\", optionally followed by an integer."))))))
(every #'integerp (rest pre-release-segment))))
(invalid "The pre-release segment must be absent or consist of \"alpha\", \"beta\", or \"rc\", optionally followed by up to two integers."))))))
(with-upgradability ()
(defun simple-version-constraint-p (constraint)
......
......@@ -91,9 +91,9 @@ previously-loaded version of ASDF."
;; Relying on its automation, the version is now redundantly present on top of asdf.lisp.
;; "3.4" would be the general branch for major version 3, minor version 4.
;; "3.4.5" would be an official release in the 3.4 branch.
;; "3.4.5.67" would be a development version in the official branch, on top of 3.4.5.
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
;; "3.4.6-alpha.1" would be a development version in the official branch, on top of 3.4.5.
;; "3.4.5.8" would be your eighth local modification of official release 3.4.5
;; "3.4.6-alpha.1.8" would be your eighth local modification of development version 3.4.6-alpha.1
(asdf-version "3.4.0-alpha.1")
(existing-version (asdf-version)))
(setf *asdf-version* asdf-version)
......
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