Skip to content

skillup apply

Write each segment's warranted version into its plugin.json. By default it writes only (no commit, no tag, no push), so the bump lands in the same commit as the change that earned it.

skillup apply [--path <dir>] [--commit] [--push --branch <b> --remote <url>]

Flags

Flag Default Meaning
-p, --path . Repository root
--commit off Commit the manifests that were written
--push off Push that commit; requires --branch and --remote
--branch none Branch to push to
--remote none Remote URL to push to
--username skillup Username for token authentication
--message chore(release): bump plugin versions Commit message
--author-name skillup Commit author name
--author-email skillup@phpboyscout.uk Commit author email

The author is set explicitly because the underlying git library reads no git config: without it, a commit succeeds on a machine that happens to have user.name set and fails in a clean container.

Output

One line per segment it acted on:

$ skillup apply --path .
  alpha                    0.3.0 -> 0.4.0
  bravo                    held at 2.0.0 (would not lower to 1.4.0)

When there is nothing to do it says so and exits 0:

$ skillup apply --path .
  nothing to write; every segment is at the version its commits warrant

With --commit it adds committed <short sha>, or nothing staged; not committing when the manifests were already at their target. With --push, pushed to <branch> follows.

Credentials

--push takes its token from the SKILLUP_TOKEN environment variable. There is deliberately no --token flag: a flag lands in the process arguments, where anything else on the machine can read it.

SKILLUP_TOKEN="$MY_TOKEN" skillup apply --path . --commit --push \
  --branch my-branch --remote https://gitlab.com/org/repo.git --username oauth2

What it will not do

  • It never lowers a version. If the manifest is at or above the warranted version it is left alone, and that is reported rather than silent.
  • It rewrites only the version value. The manifest is otherwise byte-identical. There is no JSON round-trip, which would escape non-ASCII and reflow inline arrays.
  • It fails on an ambiguous manifest. The version is found by regex, not a JSON parse, so more than one "version": anywhere in the file is an error (skillup.ambiguous_version) rather than a guess. A manifest with none is skillup.no_version_key.
  • It bumps once, not twice. The calculation runs from the last committed version, so running apply again before committing changes nothing.

Exit codes

Code Meaning
0 Wrote what was needed, or there was nothing to write
1 A manifest was unreadable or ambiguous, --push was given without --branch/--remote or without SKILLUP_TOKEN, or a commit/push failed