AtlatestRepositorysigil-version
sigil-version / treeREADME.md
1
# sigil-version3
> **Archived at Sigil 0.19.0:** The maintained implementation now lives in4
> `codeberg:sigil/sigil`. This repository and all tags remain available for5
> provenance, but no further standalone releases will be published.7
Semantic versioning for [Sigil](https://codeberg.org/sigil/sigil) — parse, compare, and constraint-match version strings per [semver 2.0.0](https://semver.org/).9
## Usage11
```scheme12
(import (sigil version))14
(define v (parse-version "1.2.3-alpha.1"))15
(version-major v) ; => 116
(version<? v (parse-version "1.2.4")) ; => #t18
;; Constraint matching19
(version-satisfies? v ">= 1.0.0") ; => #t20
(version-satisfies? v "^1.2.0") ; => #t (caret: same major, >= given)21
(version-satisfies? v "~1.2.0") ; => #t (tilde: same major.minor, >= given)22
```24
Supports the standard constraint operators (`=`, `>`, `>=`, `<`, `<=`, `^`, `~`, `*`) plus the full semver field set (major / minor / patch / prerelease / build). See [`src/sigil/version.sgl`](src/sigil/version.sgl) for the full export list and inline reference.26
## Building28
```sh29
sigil deps install30
sigil build31
sigil test32
```34
For local development against an in-tree `sigil-lang` checkout:36
```sh37
sigil build --redirects ./dev-redirects.sgl38
```40
## License42
BSD-3-Clause. See [LICENSE](LICENSE) (license header lives in `package.sgl`).