ek9_increment_version
Answers with the new version and previousVersion after bumping one component of the 'defines package' version literal, plus written and line.
When to use it
'Bump the package version' is one call with file:'package.ek9' and component:'patch' (or major, minor, build). Pick the component by intent: build for a CI snapshot, patch for a bugfix, minor for a feature, major for a breaking change.
When not to use it
- Setting an explicit version rather than bumping the current one - use
ek9_set_version. - Switching to a feature-tagged version (X.Y.Z-feature) - use
ek9_set_feature_version. - Reading the current version without changing it - use
ek9_query_package_version.
Details
Cascading reset: major zeros minor/patch/build; minor zeros patch/build; patch zeros build; build increments only. The current format is preserved - plain (major.minor.patch-build) or feature-tagged (major.minor.patch-feature-build). The version literal is read before and after the rewrite, so version, previousVersion, written and line are facts from the file, not the CLI's log. An unknown component is refused before the fork (the CLI would silently rewrite the file unchanged). Typical release chain: ek9_run_tests -> ek9_increment_version -> ek9_deploy_package.
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
component | string: major | minor | patch | build | Which component to increment; the lower ones reset to 0. | |
file | string | yes | The .ek9 file holding the 'defines package' block, workspace-relative (typically 'package.ek9'); an absolute path inside the workspace is accepted. |
verbosity | string: full | summary | none | Response size. The default answers with status, summary, version, previousVersion, written and line; 'full' adds the CLI's argv, exitCode, elapsedMs and timedOut. |
Recorded calls
Real calls, recorded against small projects and checked on every build - a changed answer fails it.
Increment minor component
Request
{
"component" : "minor",
"file" : "<workspace-root>/package.ek9"
}
Response
{
"file" : "package.ek9",
"line" : 5,
"meta" : {
"serverMs" : "<timing>"
},
"previousVersion" : "1.0.0-0",
"status" : "ok",
"summary" : "version 1.0.0-0 -> 1.1.0-0",
"version" : "1.1.0-0",
"written" : true
}
See also
- Show me in the IDE: The package block
- Part of the release workflow: Bump version + run tests with coverage + build artefact + install locally + verify.