version

Last updated on

Bump artifact version numbers

Bumps the semantic version in an artifact file.

Usage

paradoc version <file> <bump-type>

Arguments

ArgumentDescription
fileArtifact file to bump version
bump-typeBump type or specific version

Bump types

TypeDescriptionExample
majorBump major version1.2.3 → 2.0.0
minorBump minor version1.2.3 → 1.3.0
patchBump patch version1.2.3 → 1.2.4
premajorBump to next major prerelease1.2.3 → 2.0.0-0
preminorBump to next minor prerelease1.2.3 → 1.3.0-0
prepatchBump to next patch prerelease1.2.3 → 1.2.4-0
prereleaseBump prerelease version1.2.3-0 → 1.2.3-1
<version>Set specific version1.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 patch

Bump minor version:

paradoc version my-form.yaml minor

Set specific version:

paradoc version my-form.yaml 2.0.0

Output

✓ Version bumped: 1.2.3 → 1.3.0

Updated: my-form.yaml

Error handling

Invalid bump type:

Error: Invalid bump type: invalid
Valid types: major, minor, patch, premajor, preminor, prepatch, prerelease, or a specific version

Missing version field:

Error: Artifact does not have a version field

See also

  • validate - Validate artifact before versioning
  • new - Create new artifacts with initial version

version must run inside a Paradoc project.

On this page