Involved Source Files Goship releases multi-module Go repositories by tagging modules in
topological dependency layers and updating dependent go.mod and go.sum files
locally.
For each dependency layer, goship tags all independent modules, computes
canonical Go module zip and go.mod checksums directly from tracked VCS files
without contacting a module proxy, and batches dependent go.mod/go.sum
updates into a single commit before tagging the next layer. Releases execute
inside an isolated VCS workspace (a temporary git worktree, hg clone, fossil
checkout, or jj workspace) and publish refs atomically. Nothing is pushed to
a remote unless -push is passed.
# Usage
goship <command> [flags] [args...]
Commands:
plan Preview layers, version transitions, commits, and tags without mutating the repo
run Execute the release locally (pass -push to publish to remote)
diff Show exported Go API changes since each module’s latest tag
list Show modules, dependency layers, latest tags, and change status
graph Render the layered dependency graph (text, json, dot, mermaid)
Target versions may be an explicit semver (e.g. v0.2.0) or a semantic
version bump (auto, patch, minor, major, with optional -pre) computed from
each module’s latest VCS tag, with optional per-module overrides
(module=v1.2.3). Passing auto selects patch, minor, or major from apidiff
changes (following Go’s semantic versioning rules: breaking changes require
a major bump on v1+, while v0 API changes select minor). Pass -check=warn or
-check=error (or set "check" in goship.json) to validate target versions
against exported API changes. Modules with no prior tag start from v0.0.0.
# Examples
goship plan v0.0.25 # explicit version for all modules
goship plan -changed auto # infer bump per changed module via apidiff
goship plan patch # bump each module’s latest tag by patch
goship plan -changed -check=warn patch
goship plan -pre rc.1 minor # minor bump with prerelease suffix
goship plan patch traces=v0.1.0 # patch bump with per-module override
goship diff # inspect exported API changes since latest tags
goship run -push v0.0.25 # execute release and push to remote
# Configuration
Goship automatically loads goship.json from the repository root if present
(overridable via -config and CLI flags). Supported VCS backends are git, hg,
fossil, and jj; workspace modules can be loaded from go.work or by walking
tracked go.mod files.
Package-Level Functions (total 2, neither is exported)