Skip to content

version

validate version - Validate version format

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"

Flags

Flag Description
--type Version type: semver or calver (required)
--format Output format (default, shell)

Examples

validate version 1.0.0 --type semver
validate version 2025.0116.1430 --type calver
eval $(validate version 1.0.0 --type semver --format shell)

See Also


Tutorials | How-to Guides | Explanation | Reference

You are here: Reference — information-oriented technical descriptions of the system.