ek9_increment_version

Answers with the new version and previousVersion after bumping one component of the 'defines package' version literal, plus written and line.

Category: Execution · Compare: npm version patch / mvn versions:set

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

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

ArgumentTypeRequiredWhat it is
componentstring: major | minor | patch | buildWhich component to increment; the lower ones reset to 0.
filestringyesThe .ek9 file holding the 'defines package' block, workspace-relative (typically 'package.ek9'); an absolute path inside the workspace is accepted.
verbositystring: full | summary | noneResponse 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