Migrate ReleaseKit to the vanity module path and new Gitea host
This commit is contained in:
@@ -10,12 +10,14 @@ From the consumer module's root, select the ReleaseKit version to adopt:
|
||||
|
||||
```sh
|
||||
: "${RELEASEKIT_TOOL_VERSION:?Set the released ReleaseKit version to adopt}"
|
||||
go get -tool "gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit@${RELEASEKIT_TOOL_VERSION}"
|
||||
go get -tool "go.maximumdirect.net/releasekit/cmd/releasekit@${RELEASEKIT_TOOL_VERSION}"
|
||||
go mod tidy
|
||||
go tool releasekit version
|
||||
```
|
||||
|
||||
Select a release that implements the API, profile, and workflow you are adopting.
|
||||
The vanity module path starts with v0.5.0. Versions through v0.4.2 declare the
|
||||
original module path and use their corresponding historical instructions.
|
||||
The module-release interface requires a release containing that feature;
|
||||
pre-feature versions through v0.3.0 use their corresponding historical interface.
|
||||
Go records the executable package in
|
||||
@@ -43,13 +45,47 @@ required imports and select the module version:
|
||||
|
||||
```sh
|
||||
: "${RELEASEKIT_TOOL_VERSION:?Set the released ReleaseKit version to adopt}"
|
||||
go get "gitea.maximumdirect.net/eric/ReleaseKit@${RELEASEKIT_TOOL_VERSION}"
|
||||
go get "go.maximumdirect.net/releasekit@${RELEASEKIT_TOOL_VERSION}"
|
||||
go mod tidy
|
||||
```
|
||||
|
||||
API consumers can also register the CLI with `go get -tool` as above. Both uses
|
||||
share the module-selected ReleaseKit version.
|
||||
|
||||
## Migrating from the original module path
|
||||
|
||||
Starting with v0.5.0, ReleaseKit's module is `go.maximumdirect.net/releasekit`.
|
||||
Earlier releases declare `gitea.maximumdirect.net/eric/ReleaseKit`. The migration
|
||||
is a direct cutover with the existing facade roles and command behavior.
|
||||
|
||||
For API consumers, update imports of the root facade and `buildinfo` to
|
||||
`go.maximumdirect.net/releasekit` and
|
||||
`go.maximumdirect.net/releasekit/buildinfo`, including generated code and tests.
|
||||
Select v0.5.0 or a later compatible release using the package-dependency command
|
||||
above. Packages imported through the old and new paths have distinct Go
|
||||
identities; coordinate updates in packages that exchange ReleaseKit facade
|
||||
types. Builders and applications using `buildinfo` should adopt the new path
|
||||
together so version injection addresses the runtime implementation they use.
|
||||
|
||||
For CLI tool consumers, remove the old tool declaration before registering the
|
||||
new CLI package with the tool-dependency command above:
|
||||
|
||||
```sh
|
||||
go mod edit -droptool=gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit
|
||||
```
|
||||
|
||||
Update copied release launchers and Woodpecker workflows so their
|
||||
`releasekit_module` value is `go.maximumdirect.net/releasekit`. Use the maintained
|
||||
examples matching the selected tool version. Run `go mod tidy` after updating
|
||||
imports and tool declarations, review any old-path dependencies retained
|
||||
transitively, and commit the resulting module files with the workflow changes.
|
||||
|
||||
Existing consumer tags retain their recorded module files, tool selection, and
|
||||
matching workflows for retries. Apply these migration steps to new consumer
|
||||
revisions. Source repository and hosted release URLs use
|
||||
`https://forge.maximumdirect.net/base-layer/releasekit`; the vanity path is the
|
||||
Go module identity. The Go consumer minimum remains 1.26.0.
|
||||
|
||||
## CI adoption
|
||||
|
||||
The maintained [consumer tag-delivery workflow](delivery.md#woodpecker-tag-workflows)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
releasekit "gitea.maximumdirect.net/eric/ReleaseKit"
|
||||
releasekit "go.maximumdirect.net/releasekit"
|
||||
)
|
||||
|
||||
func build(ctx context.Context) error {
|
||||
|
||||
@@ -244,7 +244,7 @@ and application artifact compilation retain their separate environments.
|
||||
The normal Go module and build caches are sufficient. Cache mounts may be added
|
||||
as deployment configuration when they help the runner; they are not needed by
|
||||
the template. A separately installed executable can be installed with
|
||||
`go install gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit@PIN`, then run
|
||||
`go install go.maximumdirect.net/releasekit/cmd/releasekit@PIN`, then run
|
||||
with the same arguments. With the event object available in the CI checkout,
|
||||
resolve it to its source commit before invocation:
|
||||
|
||||
@@ -286,7 +286,9 @@ describes these checks.
|
||||
|
||||
To isolate a public ReleaseKit download from application settings and the
|
||||
existing module cache, run the following with a compatible local Go toolchain.
|
||||
Replace `v0.2.0` with the affected version. This diagnostic accesses the public
|
||||
Replace `v0.5.0` with the affected vanity-path version. For an earlier release,
|
||||
use its original `gitea.maximumdirect.net/eric/ReleaseKit` module path instead.
|
||||
This diagnostic accesses the public
|
||||
Go proxy and checksum database and retains its temporary directory for inspection.
|
||||
|
||||
```sh
|
||||
@@ -298,7 +300,7 @@ Go proxy and checksum database and retains its temporary directory for inspectio
|
||||
GOPRIVATE= GONOPROXY= GONOSUMDB= \
|
||||
GOPROXY=https://proxy.golang.org GOSUMDB=sum.golang.org \
|
||||
GOMODCACHE="$checksum_dir/modules" \
|
||||
go mod download -json gitea.maximumdirect.net/eric/ReleaseKit@v0.2.0
|
||||
go mod download -json go.maximumdirect.net/releasekit@v0.5.0
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Applications can read their embedded version through the public `buildinfo`
|
||||
package:
|
||||
|
||||
```go
|
||||
import "gitea.maximumdirect.net/eric/ReleaseKit/buildinfo"
|
||||
import "go.maximumdirect.net/releasekit/buildinfo"
|
||||
|
||||
version := buildinfo.Version()
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user