Documentation
¶
Overview ¶
Command release prepares a lockstep release of every published rig module.
rig is ten modules in one repository, and they are not independent: the binary links auth, files, migrate, notify, presence and runtime, and it generates code that imports them. A rig that generates against a runtime API released under a different number is a rig nobody can use, so there is one version for all ten, and one commit that sets it everywhere.
What this does, in order:
- reads go.work for the modules to release — the use directives that are not examples, so a new module is included by being buildable rather than by being remembered here;
- refuses to continue if any of them still replaces a sibling, because a replace directive is exactly what a published module may not carry;
- rewrites every intra-repository requirement to the new version;
- commits if that rewrote anything, and tags either way: vX.Y.Z for the root, <dir>/vX.Y.Z for the rest. A version already in place is not a version already released — the tags are what release it.
It does not push and it does not tidy. Not tidying is not an oversight: `go mod tidy` is a single-module operation that resolves from the proxy and ignores the workspace, so between the rewrite and the tag it would be asked for a version that does not exist yet and would fail. The order is rewrite, tag, push the tags, and only then tidy — which is what `make release` prints at the end.
go run ./internal/release v0.1.0 [--dry-run]