validate version
Validates that a version string matches the expected format.
Supported types: semver: x.y.z (e.g., 1.0.0, 2.3.1) calver: YYYY.MMDD.HHMM (e.g., 2025.0116.1430)
Exit codes: 0 - Valid version 1 - Invalid version or error
Output formats: default: Human readable message --format shell: VALID="true" TYPE="semver" VERSION="1.0.0"
Example: validate version 1.0.0 --type semver validate version 2025.0116.1430 --type calver eval $(validate version 1.0.0 --type semver --format shell)
Usage: validate version [flags]
| Flag | Description |
|---|---|
--type <string> (optional) |
Version type: semver or calver (required) |
--format <string> (optional) |
Output format (default, shell) |
Version Formats
- semver --
MAJOR.MINOR.PATCH(e.g.,1.0.0). A leadingvprefix is stripped automatically. - calver --
YYYY.MMDD.HHMM(e.g.,2025.0116.1430).
See Also
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.