AtlatestRepositorysigil-version
1# sigil-version
2
3> **Archived at Sigil 0.19.0:** The maintained implementation now lives in
4> `codeberg:sigil/sigil`. This repository and all tags remain available for
5> provenance, but no further standalone releases will be published.
6
7Semantic versioning for [Sigil](https://codeberg.org/sigil/sigil) — parse, compare, and constraint-match version strings per [semver 2.0.0](https://semver.org/).
8
9## Usage
11```scheme
12(import (sigil version))
14(define v (parse-version "1.2.3-alpha.1"))
15(version-major v) ; => 1
16(version<? v (parse-version "1.2.4")) ; => #t
18;; Constraint matching
19(version-satisfies? v ">= 1.0.0") ; => #t
20(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```
24Supports 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## Building
28```sh
29sigil deps install
30sigil build
31sigil test
32```
34For local development against an in-tree `sigil-lang` checkout:
36```sh
37sigil build --redirects ./dev-redirects.sgl
38```
40## License
42BSD-3-Clause. See [LICENSE](LICENSE) (license header lives in `package.sgl`).