AtlatestRepositorysigil-version
1# sigil-version
2
3Semantic versioning for [Sigil](https://codeberg.org/sigil/sigil) — parse, compare, and constraint-match version strings per [semver 2.0.0](https://semver.org/).
4
5## Usage
6
7```scheme
8(import (sigil version))
9
10(define v (parse-version "1.2.3-alpha.1"))
11(version-major v) ; => 1
12(version<? v (parse-version "1.2.4")) ; => #t
14;; Constraint matching
15(version-satisfies? v ">= 1.0.0") ; => #t
16(version-satisfies? v "^1.2.0") ; => #t (caret: same major, >= given)
17(version-satisfies? v "~1.2.0") ; => #t (tilde: same major.minor, >= given)
18```
20Supports 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.
22## Building
24```sh
25sigil deps install
26sigil build
27sigil test
28```
30For local development against an in-tree `sigil-lang` checkout:
32```sh
33sigil build --redirects ./dev-redirects.sgl
34```
36## License
38BSD-3-Clause. See [LICENSE](LICENSE) (license header lives in `package.sgl`).