CLICommands
versionLast updated on
Last updated on
Bump artifact version numbers
Bumps the semantic version in an artifact file.
Usage
paradoc version <file> <bump-type>Arguments
| Argument | Description |
|---|---|
file | Artifact file to bump version |
bump-type | Bump type or specific version |
Bump types
| Type | Description | Example |
|---|---|---|
major | Bump major version | 1.2.3 → 2.0.0 |
minor | Bump minor version | 1.2.3 → 1.3.0 |
patch | Bump patch version | 1.2.3 → 1.2.4 |
premajor | Bump to next major prerelease | 1.2.3 → 2.0.0-0 |
preminor | Bump to next minor prerelease | 1.2.3 → 1.3.0-0 |
prepatch | Bump to next patch prerelease | 1.2.3 → 1.2.4-0 |
prerelease | Bump prerelease version | 1.2.3-0 → 1.2.3-1 |
<version> | Set specific version | 1.2.3 → 2.5.0-rc.1 |
Description
The version command reads an artifact file, validates it, updates the version field according to semantic versioning rules, and writes the file back. Versions follow SemVer 2.0.0, so prerelease versions such as 2.0.0-rc.1 are valid artifact versions and can be published to a registry. An explicit version must be SemVer: v2.0.0 is refused.
Examples
Bump patch version:
paradoc version my-form.yaml patchBump minor version:
paradoc version my-form.yaml minorSet specific version:
paradoc version my-form.yaml 2.0.0Output
✓ Version bumped: 1.2.3 → 1.3.0
Updated: my-form.yamlError handling
Invalid bump type:
Error: Invalid bump type: invalid
Valid types: major, minor, patch, premajor, preminor, prepatch, prerelease, or a specific versionMissing version field:
Error: Artifact does not have a version fieldSee also
version must run inside a Paradoc project.