Adopt ReleaseKit runtime version and tool
This commit is contained in:
@@ -66,6 +66,21 @@ License and notices: [LGPL 3.0](licenses/LGPL-3.0.txt) |
|
||||
|
||||
[Source](https://forge.maximumdirect.net/base-layer/commandkit/src/commit/cd5cf483a46caeff7ca0a91fb4747d57188a3888).
|
||||
|
||||
## ReleaseKit
|
||||
|
||||
Selected module: `go.maximumdirect.net/releasekit` at `v0.10.0`.
|
||||
|
||||
Copyright (C) 2026 Eric Rakestraw
|
||||
|
||||
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
License and notices: [LGPL 3.0](licenses/LGPL-3.0.txt) |
|
||||
[GPL 3.0](licenses/GPL-3.0.txt) |
|
||||
[COPYRIGHT](https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/COPYRIGHT) |
|
||||
[LICENSE](https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/LICENSE).
|
||||
|
||||
[Source](https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243).
|
||||
|
||||
## Cobra
|
||||
|
||||
Selected module: `github.com/spf13/cobra` at `v1.10.2` (transitive dependency).
|
||||
|
||||
@@ -55,7 +55,9 @@ hosted release, or live delivery.
|
||||
|
||||
## Stage 1 — Add ReleaseKit and adopt the native runtime version
|
||||
|
||||
Status: pending.
|
||||
Status: completed. ReleaseKit v0.10.0 supplies runtime version information and
|
||||
the registered tool. Verified `go test ./internal/app` and `go build ./cmd/narratio`
|
||||
with Go 1.27.4; reviewed module selection and attribution.
|
||||
|
||||
Read `go.mod`, `go.sum`, `internal/app/commands.go`,
|
||||
`internal/app/version_test.go`, `internal/buildinfo/buildinfo.go`, and
|
||||
|
||||
5
go.mod
5
go.mod
@@ -11,6 +11,7 @@ require (
|
||||
go.maximumdirect.net/ckconfig v0.11.0
|
||||
go.maximumdirect.net/commandkit v0.8.0
|
||||
go.maximumdirect.net/configkit v1.4.0
|
||||
go.maximumdirect.net/releasekit v0.10.0
|
||||
golang.org/x/sync v0.22.0
|
||||
golang.org/x/sys v0.47.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
@@ -34,5 +35,9 @@ require (
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/spf13/cobra v1.10.2 // indirect
|
||||
github.com/spf13/pflag v1.1.0 // indirect
|
||||
github.com/yuin/goldmark/v2 v2.1.16 // indirect
|
||||
go.yaml.in/yaml/v4 v4.0.0 // indirect
|
||||
golang.org/x/mod v0.43.0 // indirect
|
||||
)
|
||||
|
||||
tool go.maximumdirect.net/releasekit/cmd/releasekit
|
||||
|
||||
6
go.sum
6
go.sum
@@ -45,15 +45,21 @@ github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiT
|
||||
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/pflag v1.1.0 h1:6W6MbVUrnMb8PEhjkqwsVLY7ryuzRfFHF4mQd7L94ag=
|
||||
github.com/spf13/pflag v1.1.0/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/yuin/goldmark/v2 v2.1.16 h1:MXvCVo+Cb2SVJ5cwJUzXetDjI7HECRJCkcqylEQtcJo=
|
||||
github.com/yuin/goldmark/v2 v2.1.16/go.mod h1:G6M4/qOFtfn01/o14BU1UR2Lo5N3S9Qo7xCuz/sHjGQ=
|
||||
go.maximumdirect.net/ckconfig v0.11.0 h1:oTPW5R4vW5TNs97rqgABC/dir723rbGBz0FUyZ9QiNk=
|
||||
go.maximumdirect.net/ckconfig v0.11.0/go.mod h1:9phvXeLAgQSBKpJWqPyIQASKVJr0nRhiPMIQkfNhaRo=
|
||||
go.maximumdirect.net/commandkit v0.8.0 h1:EBDjr7SvfgvVDsA2S95hkOhgZe7oGZdDvURDJxHyX48=
|
||||
go.maximumdirect.net/commandkit v0.8.0/go.mod h1:sVp3JXKpm2YrP4Ie8Q3nWmQgwBdPN8uO+wQU72erDns=
|
||||
go.maximumdirect.net/configkit v1.4.0 h1:TfOupZbQ23/ZMs+xt5lmyukCF11ekqKep8KbmFQD63o=
|
||||
go.maximumdirect.net/configkit v1.4.0/go.mod h1:ewu6blSokUDCMovy8JBXAdXRikGmlHXAQpFghnPWRfs=
|
||||
go.maximumdirect.net/releasekit v0.10.0 h1:3GOgaIigXTkvYaRkntWZASE//2NTR1+IhkoKmt64aJo=
|
||||
go.maximumdirect.net/releasekit v0.10.0/go.mod h1:cT5NZNEcf7SKDx4MPG40YNK9V4bNyIxcLLFuNlbGQ90=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
go.yaml.in/yaml/v4 v4.0.0 h1:/LG1pNO84Z4l603j/xMn69CcS5OYhMQ/f7l2LoQUGuw=
|
||||
go.yaml.in/yaml/v4 v4.0.0/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
|
||||
golang.org/x/mod v0.43.0 h1:MFuq5J6s35W9D3IjkwyWc9vHh0nENOrt5K8Iof4ofmg=
|
||||
golang.org/x/mod v0.43.0/go.mod h1:4ec1JnuyBz5+FIVhg86UsA39YG8BpnrZdJYSNHmGzHY=
|
||||
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
|
||||
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||
|
||||
@@ -3,8 +3,8 @@ package app
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/buildinfo"
|
||||
"go.maximumdirect.net/commandkit"
|
||||
"go.maximumdirect.net/releasekit/buildinfo"
|
||||
)
|
||||
|
||||
// NewApplication constructs the native command boundary without acquiring configuration
|
||||
@@ -15,7 +15,7 @@ func NewApplication() (*commandkit.App, error) {
|
||||
|
||||
func newApplication(deps commandDependencies, executor pipelineExecutor) (*commandkit.App, error) {
|
||||
return commandkit.New(
|
||||
commandkit.Identity{Name: "narratio", Version: buildinfo.Version},
|
||||
commandkit.Identity{Name: "narratio", Version: buildinfo.Version()},
|
||||
commandkit.Completion("narratio"),
|
||||
commandkit.WithInvocationFeature(configurationCommand(deps), bootstrapFeature()),
|
||||
executionCommand("run", "Execute a session pipeline.", false, deps, executor),
|
||||
|
||||
@@ -7,14 +7,10 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/buildinfo"
|
||||
"go.maximumdirect.net/releasekit/buildinfo"
|
||||
)
|
||||
|
||||
func TestExecuteVersionReportsEmbeddedBuildVersion(t *testing.T) {
|
||||
original := buildinfo.Version
|
||||
buildinfo.Version = "v1.5.0-test"
|
||||
t.Cleanup(func() { buildinfo.Version = original })
|
||||
|
||||
func TestExecuteVersionReportsBuildVersion(t *testing.T) {
|
||||
var stdout bytes.Buffer
|
||||
var stderr bytes.Buffer
|
||||
if code := executeForTest([]string{"version", "--format", "json"}, &stdout, &stderr); code != 0 {
|
||||
@@ -27,7 +23,7 @@ func TestExecuteVersionReportsEmbeddedBuildVersion(t *testing.T) {
|
||||
if err := json.Unmarshal(stdout.Bytes(), &identity); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if identity.Name != "narratio" || identity.Version != buildinfo.Version {
|
||||
if identity.Name != "narratio" || identity.Version != buildinfo.Version() {
|
||||
t.Fatalf("version identity = %+v", identity)
|
||||
}
|
||||
if stderr.Len() != 0 {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
// Package buildinfo exposes metadata supplied by the release build.
|
||||
package buildinfo
|
||||
|
||||
// Version is the Narratio release identifier. Source builds report "dev";
|
||||
// release automation replaces it with the exact Git tag through -ldflags -X.
|
||||
var Version = "dev"
|
||||
Reference in New Issue
Block a user