v0.x: the static release channel¶
Spec 0203 adds a second release channel for self-updating tools and withdraws the direct channel the generator carried under spec 0195 D7.
What changed¶
- A new channel.
release_source.type: staticwithrelease_source.static.base_urlmakes a tool read its releases from a pointer (<base>/latest.json) and per-tag manifests (<base>/<tag>/release.json) at any https location, with no forge involved. The generator offers it on the self-update page and as--release-channel static --release-base-url <url>; a project generated with--no-forgecan self-update this way, which it could not before. The forge stays the default for a hosted project. - The direct channel is gone from the generator.
--release-channel directand the seven--release-*template flags are refused or removed.release_source.direct.*in an existing manifest still loads, and the firstregeneratedrops the block and says so in its log.release_source.type: directis refused with a message naming the replacement. No project was ever generated with a working direct channel, so nothing is migrated from it. The framework's ownprops.ReleaseSource{Type: "direct"}through go/forge's direct provider is unaffected: this note is about what the generator writes. props.ReleaseSourcegainsBaseURLand the constantprops.ReleaseSourceStatic.- gtb updates from the static channel.
gtb updatereadshttps://pkg.phpboyscout.uk/go-tool-base/latest.jsonand no longer consults GitLab. A gtb installed before this change still updates through the GitLab release's asset links, which point at the same store.
Moving a project to the static channel¶
-
Record the location, then the type, so validation never sees a static type without its URL:
gtb set release_source.static.base_url https://pkg.example.org/acme/mytool gtb set release_source.type staticOr regenerate with
--release-channel static --release-base-url <url>. -
The regenerate that follows renders the tool's release source as the type and the base URL, adds
before_publish,blobsandpublishersto.goreleaser.yaml, shipsscripts/move-pointer.sh, adds thego tool releasemanifestdirective togo.mod, and sets the GitLab pipeline's goreleaser component topro: true. - Give the pipeline what the release configuration reads:
GORELEASER_KEY,RELEASE_STORE_ENDPOINT,RELEASE_STORE_BUCKETand the store'sAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY. See Secure releases. - The first release on the channel starts the chain (
previousis empty) and creates the pointer. Installed copies of the previous release update through the forge as before; from the next release on they read the pointer.
An estate tool follows the same steps; the store's base URL is https://pkg.phpboyscout.uk/<project path>.
Leaving it¶
Set release_source.type back to the forge and regenerate: the three goreleaser pieces, the pointer script and the tool directive go, and a base URL left behind is ignored with a warning until it is cleared.