AtlatestRepositorysigil-version
sigil-version / treeREADME.md
1
# sigil-version3
Semantic versioning for [Sigil](https://codeberg.org/sigil/sigil) — parse, compare, and constraint-match version strings per [semver 2.0.0](https://semver.org/).5
## Usage7
```scheme8
(import (sigil version))10
(define v (parse-version "1.2.3-alpha.1"))11
(version-major v) ; => 112
(version<? v (parse-version "1.2.4")) ; => #t14
;; Constraint matching15
(version-satisfies? v ">= 1.0.0") ; => #t16
(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
```20
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.22
## Building24
```sh25
sigil deps install26
sigil build27
sigil test28
```30
For local development against an in-tree `sigil-lang` checkout:32
```sh33
sigil build --redirects ./dev-redirects.sgl34
```36
## License38
BSD-3-Clause. See [LICENSE](LICENSE) (license header lives in `package.sgl`).