Go Bump Version
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Set a Go project’s in-tree version literal to an exact, caller-supplied value, verify that the release build’s
-ldflags -X override still reaches it, and follow the catalog’s x.y.z-dev development-version convention.
Purpose
iru-go-bump-version never computes a version; it validates the given string (X.Y.Z or X.Y.Z-dev, stripping a
leading v, asking about other SemVer pre-releases and refusing anything else) and applies it. An embedded Python
helper with --list, --dry-run, --force and --files= modes finds every var Version = "…" or
const Version = "…" literal in non-test, non-generated .go files, including the internal/version/version.go
file of the iru-setup-go-cli scaffold. It refuses to write when literals disagree until the user confirms, flags a
const Version (which -ldflags -X silently cannot override), and checks every -X …Version= reference in
.goreleaser.yaml, Makefile, Taskfile.yml, justfile and GitHub workflows against the real import path, since the
linker ignores a wrong path silently. It warns when a major version 2 or above does not match a /vN module-path
suffix, without ever rewriting it. A library with no literal is reported as taking its version from git tags and
nothing is changed. Step 5 documents the pre-release convention that iru-release calls it against, and it can
optionally sync README and Antora version mentions.
Plugin
Shipped by the iru-go plugin of the ai-catalog marketplace (install with /plugin install iru-go@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
Yes |
Literal target version without a |
Asked for if missing. |
|
No |
|
Ask when such mentions exist. |
|
No |
Upcoming development version that "Current development version" markers should show after a release. Only meaningful
with |
None |
|
No |
Comma list of |
Every git-tracked non-test |
|
No |
|
|
Outputs
-
Updated
Versionliterals in the detected.gofiles, or no change when the version comes from git tags. -
Optionally updated README and Antora version mentions.
-
A report: each literal with its old and new value,
constnotes, every-ldflags -Xreference markedokorMISMATCH, every file touched, any disagreement aligned with--force, golden or test files that mirror the old value, and the sanity-check result (--listagreement,--versionoutput or "not run"). -
A warning to review the diff before committing, to tag releases as
v<new-version>, and that a major version 2 or above needs the/vNmodule path.
Execution flow
Dependencies
Invokes
None — it runs an embedded Python helper and go build directly. Step 5 is a documented convention for callers rather
than an invocation.
Invoked by
-
Release — Step 6, version bump for Go projects (called twice per release: release value and next development value).
Also referenced (not invoked) by Setup Go CLI and
Setup CLI GitHub Workflows, whose scaffold and sync.yml workflow follow the x.y.z-dev
convention this skill maintains.
Source
SKILL.md on GitHub — the file this page was generated from.