Semantic versioning parsing and comparison for Sigil.
- Scheme 100%
|
David Wilson
2d2c9ef9c2
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Update the package version and Sigil compatibility range to 0.16, then regenerate the lockfile against sigil-stdlib ^0.16. Verification: - /tmp/sigil-t-e6e9/build/dev/bin/sigil deps install - /tmp/sigil-t-e6e9/build/dev/bin/sigil build - /tmp/sigil-t-e6e9/build/dev/bin/sigil test |
||
|---|---|---|
| src/sigil | Fix exception handler double-pop causing test runner segfault | |
| test | Fix exception handler double-pop causing test runner segfault | |
| .gitignore | Extract sigil-version from sigil monorepo as standalone repo | |
| .woodpecker.yml | Bump CI pin to sigil v0.14.3 | |
| dev-redirects.sgl | Extract sigil-version from sigil monorepo as standalone repo | |
| LICENSE | Extract sigil-version from sigil monorepo as standalone repo | |
| manifest.scm | Extract sigil-version from sigil monorepo as standalone repo | |
| package.sgl | Bump sigil-version to Sigil 0.16 | |
| README.md | Extract sigil-version from sigil monorepo as standalone repo | |
| sigil.lock | Bump sigil-version to Sigil 0.16 | |
sigil-version
Semantic versioning for Sigil — parse, compare, and constraint-match version strings per semver 2.0.0.
Usage
(import (sigil version))
(define v (parse-version "1.2.3-alpha.1"))
(version-major v) ; => 1
(version<? v (parse-version "1.2.4")) ; => #t
;; Constraint matching
(version-satisfies? v ">= 1.0.0") ; => #t
(version-satisfies? v "^1.2.0") ; => #t (caret: same major, >= given)
(version-satisfies? v "~1.2.0") ; => #t (tilde: same major.minor, >= given)
Supports the standard constraint operators (=, >, >=, <, <=, ^, ~, *) plus the full semver field set (major / minor / patch / prerelease / build). See src/sigil/version.sgl for the full export list and inline reference.
Building
sigil deps install
sigil build
sigil test
For local development against an in-tree sigil-lang checkout:
sigil build --redirects ./dev-redirects.sgl
License
BSD-3-Clause. See LICENSE (license header lives in package.sgl).