Releasing#
genop and genop-runtime are released in lockstep on matching
version tags (v0.1.0, v0.2.0, …): a cross-repo change lands as a
genop-runtime branch, merged and tagged first, then a genop branch
bumps go.mod to that tag and does its own side of the change.
genop-testing is a third, independent module (root package and
matchers) — it releases on its own cadence and is not part of
the lockstep. Its go.mod is deliberately pinned to the ecosystem floor
(rather than the newest Kubernetes/controller-runtime versions) so it never
force-upgrades consumers; that floor is a deliberate choice, not
staleness — don’t “fix” it by bumping without checking why it’s pinned.
Working on the three repositories together#
Clone genop, genop-runtime and genop-testing side by side and create a
Go workspace in their parent directory (it is git-ignored):
go work init ./genop ./genop-runtime ./genop-testingA cross-repo change can then be built and tested before anything is tagged.
If a go.mod already requires the upcoming, not yet published tag, also
point that version at the local checkout:
go work edit -replace gitlab.com/kornercloud.dev/genop-runtime@v0.2.0=./genop-runtimego mod tidy ignores the workspace: run it once the tags are published.
What ships where#
cmd/cli/tpl/go.mod.tplemitsgenop-runtime {{ .genopVersion }}andgenop-testing {{ .genopTestingVersion }}into every generated project’sgo.mod.genopVersiondefaults to the CLI binary’s ownVersionldflag;genopTestingVersiondefaults toDefaultGenopTestingVersionincmd/cli/root.go— bump that constant on a genop-testing release.genop/go.moditself requires bothgenop-runtimeandgenop-testing— both require lines are load-bearing:test/e2e/utils_test.go’sfindGenopRuntimeVersion()/findGenopTestingVersion()parse them to pass--genop-version/--genop-testing-versionwhen scaffolding test fixtures. Never delete either require line.
Publishing a new genop release#
- Merge the corresponding genop-runtime change and tag it first.
- Bump this repo’s
go.modto the newgenop-runtimetag. - Add a row to Version compatibility for the new tag.
- Tag genop with the matching version.
What CI does on a tag#
Pushing a vX.Y.Z tag is what publishes a Go module: there is nothing to
upload. On such a tag, each repository’s pipeline runs lint and tests, then:
release-noteslists the commits since the previous tag and asks proxy.golang.org for the new version, so it is cached and shows up on pkg.go.dev right away;releasecreates the GitLab Release with those notes.
Pipelines never start on a plain push (see workflow: in .gitlab-ci.yml):
only on tags, merge requests, and “Run pipeline” by a maintainer. The
documentation site is deployed on release tags.
The cross-repository steps (bumping go.mod to the new genop-testing or
genop-runtime tag) stay manual. Only maintainers can push v* tags (protected
tags).
See Version compatibility for the current pinned versions.