8 Commits
v0.4.1 ... main

78 changed files with 421 additions and 229 deletions

View File

@@ -8,6 +8,10 @@ tagged-source delivery API, and the `version`, `check`, `publish`, `build`,
maintainer procedure and prepared Woodpecker workflow for hosted note-page maintainer procedure and prepared Woodpecker workflow for hosted note-page
delivery are documented. ReleaseKit does not declare binary deliverables. delivery are documented. ReleaseKit does not declare binary deliverables.
The Go module is `go.maximumdirect.net/releasekit`. The
[adoption guide](docs/consumers/adoption.md#migrating-from-the-original-module-path)
explains the v0.5.0 migration from the original Gitea module path.
Release operations can select one Go module within a repository. The repository Release operations can select one Go module within a repository. The repository
root remains the default; a selected module's declared import path and physical root remains the default; a selected module's declared import path and physical
directory determine its complete Git tag and module-local release note. See the directory determine its complete Git tag and module-local release note. See the

View File

@@ -5,11 +5,11 @@ import (
"fmt" "fmt"
"io" "io"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/artifact" "go.maximumdirect.net/releasekit/internal/artifact"
internalbuild "gitea.maximumdirect.net/eric/ReleaseKit/internal/build" internalbuild "go.maximumdirect.net/releasekit/internal/build"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/releaseidentity" "go.maximumdirect.net/releasekit/internal/releaseidentity"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
) )
// Target identifies one explicit Go operating-system and architecture pair. // Target identifies one explicit Go operating-system and architecture pair.

View File

@@ -15,7 +15,7 @@ import (
"testing" "testing"
"time" "time"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
) )
func TestBuildPreservesInvalidVersionAndDeclarationFailureEvidence(t *testing.T) { func TestBuildPreservesInvalidVersionAndDeclarationFailureEvidence(t *testing.T) {
@@ -48,7 +48,7 @@ import (
"fmt" "fmt"
"os" "os"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { func main() {
@@ -127,7 +127,7 @@ func TestBuildUsesGoHostDespiteAmbientTargetEnvironment(t *testing.T) {
import ( import (
"fmt" "fmt"
"os" "os"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { func main() {
@@ -159,7 +159,7 @@ func TestBuildIgnoresAmbientAndPersistentArchitectureTuning(t *testing.T) {
import ( import (
"fmt" "fmt"
"os" "os"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { if len(os.Args) == 2 && os.Args[1] == "version" { fmt.Printf("fixture %s\n", buildinfo.Version()) } } func main() { if len(os.Args) == 2 && os.Args[1] == "version" { fmt.Printf("fixture %s\n", buildinfo.Version()) } }
`) `)
@@ -272,7 +272,7 @@ func TestBuildUsesNestedWorkingTreeModuleAndModuleRelativeOutput(t *testing.T) {
import ( import (
"fmt" "fmt"
"os" "os"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { func main() {
if len(os.Args) == 2 && os.Args[1] == "version" { if len(os.Args) == 2 && os.Args[1] == "version" {
@@ -406,7 +406,7 @@ func TestBuildResolvesDirtyWorkingTreeDeclaration(t *testing.T) {
func TestBuildRegeneratesOwnedOutputsAndPreservesUnrelatedFiles(t *testing.T) { func TestBuildRegeneratesOwnedOutputsAndPreservesUnrelatedFiles(t *testing.T) {
const source = `package main const source = `package main
import("fmt";"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo") import("fmt";"go.maximumdirect.net/releasekit/buildinfo")
func main(){fmt.Println("fixture",buildinfo.Version())} func main(){fmt.Println("fixture",buildinfo.Version())}
` `
repository := newBuildConsumer(t, source) repository := newBuildConsumer(t, source)
@@ -616,7 +616,7 @@ func TestCheckBuildsAfterValidationAndKeepsOutputOutsideWorktree(t *testing.T) {
import ( import (
"fmt" "fmt"
"os" "os"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { if len(os.Args) == 2 && os.Args[1] == "version" { fmt.Printf("fixture %s\n", buildinfo.Version()) } } func main() { if len(os.Args) == 2 && os.Args[1] == "version" { fmt.Printf("fixture %s\n", buildinfo.Version()) } }
`) `)
@@ -713,7 +713,7 @@ func newBuildConsumer(t *testing.T, mainSource string) string {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
module := fmt.Sprintf("module example.com/buildfixture\n\ngo 1.26.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.0.0\n\nreplace gitea.maximumdirect.net/eric/ReleaseKit => %s\n", filepath.ToSlash(root)) module := fmt.Sprintf("module example.com/buildfixture\n\ngo 1.26.0\n\nrequire go.maximumdirect.net/releasekit v0.0.0\n\nreplace go.maximumdirect.net/releasekit => %s\n", filepath.ToSlash(root))
writeBuildFixture(t, repository, "go.mod", module) writeBuildFixture(t, repository, "go.mod", module)
writeBuildFixture(t, repository, "cmd/app/main.go", mainSource) writeBuildFixture(t, repository, "cmd/app/main.go", mainSource)
writeBuildFixture(t, repository, "cmd/app/main_test.go", "package main\nimport \"testing\"\nfunc TestCandidateFixture(t *testing.T) {}\n") writeBuildFixture(t, repository, "cmd/app/main_test.go", "package main\nimport \"testing\"\nfunc TestCandidateFixture(t *testing.T) {}\n")
@@ -731,7 +731,7 @@ func writeNestedBuildConsumer(t *testing.T, repository, moduleDir, modulePath, m
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
module := fmt.Sprintf("module %s\n\ngo 1.26.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.0.0\n\nreplace gitea.maximumdirect.net/eric/ReleaseKit => %s\n", modulePath, filepath.ToSlash(root)) module := fmt.Sprintf("module %s\n\ngo 1.26.0\n\nrequire go.maximumdirect.net/releasekit v0.0.0\n\nreplace go.maximumdirect.net/releasekit => %s\n", modulePath, filepath.ToSlash(root))
writeBuildFixture(t, repository, filepath.ToSlash(filepath.Join(moduleDir, "go.mod")), module) writeBuildFixture(t, repository, filepath.ToSlash(filepath.Join(moduleDir, "go.mod")), module)
writeBuildFixture(t, repository, filepath.ToSlash(filepath.Join(moduleDir, "cmd/app/main.go")), mainSource) writeBuildFixture(t, repository, filepath.ToSlash(filepath.Join(moduleDir, "cmd/app/main.go")), mainSource)
return filepath.Join(repository, filepath.FromSlash(moduleDir)) return filepath.Join(repository, filepath.FromSlash(moduleDir))
@@ -743,7 +743,7 @@ func prepareCandidateBuild(t *testing.T, repository, mainSource string) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
module := fmt.Sprintf("module example.com/candidatebuild\n\ngo 1.26.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.0.0\n\nreplace gitea.maximumdirect.net/eric/ReleaseKit => %s\n", filepath.ToSlash(root)) module := fmt.Sprintf("module example.com/candidatebuild\n\ngo 1.26.0\n\nrequire go.maximumdirect.net/releasekit v0.0.0\n\nreplace go.maximumdirect.net/releasekit => %s\n", filepath.ToSlash(root))
writeFile(t, repository, "go.mod", module) writeFile(t, repository, "go.mod", module)
writeFile(t, repository, ".gitignore", "dist/\n") writeFile(t, repository, ".gitignore", "dist/\n")
writeFile(t, repository, "cmd/app/main.go", mainSource) writeFile(t, repository, "cmd/app/main.go", mainSource)
@@ -777,7 +777,7 @@ func buildGit(t *testing.T, directory string, args ...string) string {
func TestBuildSourceEligibilitySurvivesLaterCheckoutCleanup(t *testing.T) { func TestBuildSourceEligibilitySurvivesLaterCheckoutCleanup(t *testing.T) {
const source = `package main const source = `package main
import("fmt";"os";"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo") import("fmt";"os";"go.maximumdirect.net/releasekit/buildinfo")
func main(){ if len(os.Args)>1 && os.Args[1]=="version" {fmt.Println("fixture",buildinfo.Version())} } func main(){ if len(os.Args)>1 && os.Args[1]=="version" {fmt.Println("fixture",buildinfo.Version())} }
` `
for _, mode := range []string{"clean", "dirty before build", "changed during build", "commit during build"} { for _, mode := range []string{"clean", "dirty before build", "changed during build", "commit during build"} {
@@ -838,7 +838,7 @@ func TestCandidateBuildDoesNotRequireWritableRepositoryParent(t *testing.T) {
t.Skip("requires ordinary Unix permission checks") t.Skip("requires ordinary Unix permission checks")
} }
repository := newBuildConsumer(t, `package main repository := newBuildConsumer(t, `package main
import("fmt";"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo") import("fmt";"go.maximumdirect.net/releasekit/buildinfo")
func main(){fmt.Println("fixture",buildinfo.Version())} func main(){fmt.Println("fixture",buildinfo.Version())}
`) `)
writeBuildFixture(t, repository, "docs/releases/v1.2.3.md", "# Fixture v1.2.3\n") writeBuildFixture(t, repository, "docs/releases/v1.2.3.md", "# Fixture v1.2.3\n")

View File

@@ -2,7 +2,7 @@
// built with ReleaseKit. // built with ReleaseKit.
package buildinfo package buildinfo
import "gitea.maximumdirect.net/eric/ReleaseKit/internal/runtimeinfo" import "go.maximumdirect.net/releasekit/internal/runtimeinfo"
// Version returns the injected release identifier when available. Otherwise, // Version returns the injected release identifier when available. Otherwise,
// it returns the executable's main module version, or "dev" when that metadata // it returns the executable's main module version, or "dev" when that metadata

View File

@@ -7,7 +7,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
) )
func TestVersionInConsumerExecutable(t *testing.T) { func TestVersionInConsumerExecutable(t *testing.T) {
@@ -21,9 +21,9 @@ func TestVersionInConsumerExecutable(t *testing.T) {
go 1.26.0 go 1.26.0
require gitea.maximumdirect.net/eric/ReleaseKit v0.0.0 require go.maximumdirect.net/releasekit v0.0.0
replace gitea.maximumdirect.net/eric/ReleaseKit => %s replace go.maximumdirect.net/releasekit => %s
`, filepath.ToSlash(repo)) `, filepath.ToSlash(repo))
if err := os.WriteFile(filepath.Join(dir, "go.mod"), []byte(module), 0o600); err != nil { if err := os.WriteFile(filepath.Join(dir, "go.mod"), []byte(module), 0o600); err != nil {
t.Fatal(err) t.Fatal(err)
@@ -32,7 +32,7 @@ replace gitea.maximumdirect.net/eric/ReleaseKit => %s
import ( import (
"fmt" "fmt"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { fmt.Print(buildinfo.Version()) } func main() { fmt.Print(buildinfo.Version()) }

View File

@@ -4,10 +4,10 @@ import (
"context" "context"
"io" "io"
internalbuild "gitea.maximumdirect.net/eric/ReleaseKit/internal/build" internalbuild "go.maximumdirect.net/releasekit/internal/build"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/candidate" "go.maximumdirect.net/releasekit/internal/candidate"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/publish" "go.maximumdirect.net/releasekit/internal/publish"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/validation" "go.maximumdirect.net/releasekit/internal/validation"
) )
// ErrInvalidVersion reports a version that is not stable vMAJOR.MINOR.PATCH. // ErrInvalidVersion reports a version that is not stable vMAJOR.MINOR.PATCH.

View File

@@ -7,7 +7,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit/internal/cli" "go.maximumdirect.net/releasekit/cmd/releasekit/internal/cli"
) )
func TestBuildAndPrebuiltDeliveryUseSameDirectoryBase(t *testing.T) { func TestBuildAndPrebuiltDeliveryUseSameDirectoryBase(t *testing.T) {

View File

@@ -9,7 +9,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit/internal/cli" "go.maximumdirect.net/releasekit/cmd/releasekit/internal/cli"
) )
func TestCandidateCheckUsesCommittedDeclarationSymlink(t *testing.T) { func TestCandidateCheckUsesCommittedDeclarationSymlink(t *testing.T) {

View File

@@ -12,7 +12,7 @@ func TestMultiModuleExampleSetupUsesCurrentSourceTool(t *testing.T) {
root := cliRepositoryRoot(t) root := cliRepositoryRoot(t)
repository := newCLIRepository(t) repository := newCLIRepository(t)
copyExampleTree(t, filepath.Join(root, "examples", "multi-module"), repository) copyExampleTree(t, filepath.Join(root, "examples", "multi-module"), repository)
const module = "gitea.maximumdirect.net/eric/ReleaseKit" const module = "go.maximumdirect.net/releasekit"
environment := append(os.Environ(), "GOTOOLCHAIN=local", "GOWORK=off", "GOPROXY=off", "GOSUMDB=off", "GOFLAGS=") environment := append(os.Environ(), "GOTOOLCHAIN=local", "GOWORK=off", "GOPROXY=off", "GOSUMDB=off", "GOFLAGS=")
goCommand := func(directory string, args ...string) string { goCommand := func(directory string, args ...string) string {
t.Helper() t.Helper()

View File

@@ -13,8 +13,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/process" "go.maximumdirect.net/releasekit/internal/process"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
) )
const Usage = "usage: releasekit version\n releasekit check [--repo DIR] [--config FILE] VERSION\n releasekit publish [--repo DIR] [--config FILE] [--expected-module DIR] VERSION\n releasekit build [--repo DIR] [--config FILE] [--output DIR] VERSION\n releasekit deliver [--repo DIR] [--config FILE] [--assets DIR] VERSION\n releasekit ci-deliver [--repo DIR] [--config FILE] [--remote NAME] [--prepared] [--expected-module DIR] --commit OID TAG" const Usage = "usage: releasekit version\n releasekit check [--repo DIR] [--config FILE] VERSION\n releasekit publish [--repo DIR] [--config FILE] [--expected-module DIR] VERSION\n releasekit build [--repo DIR] [--config FILE] [--output DIR] VERSION\n releasekit deliver [--repo DIR] [--config FILE] [--assets DIR] VERSION\n releasekit ci-deliver [--repo DIR] [--config FILE] [--remote NAME] [--prepared] [--expected-module DIR] --commit OID TAG"

View File

@@ -10,9 +10,9 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/artifact" "go.maximumdirect.net/releasekit/internal/artifact"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/releaseidentity" "go.maximumdirect.net/releasekit/internal/releaseidentity"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
) )
const BuildReceiptName = ".releasekit-build.json" const BuildReceiptName = ".releasekit-build.json"

View File

@@ -7,7 +7,7 @@ import (
"strings" "strings"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit/internal/cli" "go.maximumdirect.net/releasekit/cmd/releasekit/internal/cli"
) )
func TestMainModuleWithoutDomainSupportsCheckBuildAndPageDelivery(t *testing.T) { func TestMainModuleWithoutDomainSupportsCheckBuildAndPageDelivery(t *testing.T) {

View File

@@ -11,12 +11,12 @@ import (
"strings" "strings"
"syscall" "syscall"
"gitea.maximumdirect.net/eric/ReleaseKit" "go.maximumdirect.net/releasekit"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
"gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit/internal/cli" "go.maximumdirect.net/releasekit/cmd/releasekit/internal/cli"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/artifact" "go.maximumdirect.net/releasekit/internal/artifact"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/releaseidentity" "go.maximumdirect.net/releasekit/internal/releaseidentity"
) )
func main() { func main() {

View File

@@ -18,9 +18,9 @@ import (
"sync" "sync"
"testing" "testing"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
"gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit/internal/cli" "go.maximumdirect.net/releasekit/cmd/releasekit/internal/cli"
) )
func TestVersionCommand(t *testing.T) { func TestVersionCommand(t *testing.T) {
@@ -472,7 +472,7 @@ import (
"fmt" "fmt"
"os" "os"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { func main() {
@@ -1375,7 +1375,7 @@ func newCLIBuildRepository(t *testing.T, mainSource string) string {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
module := fmt.Sprintf("module example.com/cli-candidate\n\ngo 1.26.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.0.0\n\nreplace gitea.maximumdirect.net/eric/ReleaseKit => %s\n", filepath.ToSlash(root)) module := fmt.Sprintf("module example.com/cli-candidate\n\ngo 1.26.0\n\nrequire go.maximumdirect.net/releasekit v0.0.0\n\nreplace go.maximumdirect.net/releasekit => %s\n", filepath.ToSlash(root))
write := func(name, contents string) { write := func(name, contents string) {
t.Helper() t.Helper()
path := filepath.Join(repository, filepath.FromSlash(name)) path := filepath.Join(repository, filepath.FromSlash(name))
@@ -1530,7 +1530,7 @@ func TestUnreadableAssetsDoNotClaimAnUnknownWrite(t *testing.T) {
func TestFailedRebuildInvalidatesPreviousReceipt(t *testing.T) { func TestFailedRebuildInvalidatesPreviousReceipt(t *testing.T) {
const source = `package main const source = `package main
import("fmt";"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo") import("fmt";"go.maximumdirect.net/releasekit/buildinfo")
func main(){fmt.Println("fixture",buildinfo.Version())} func main(){fmt.Println("fixture",buildinfo.Version())}
` `
repository := newCLIBuildRepository(t, source) repository := newCLIBuildRepository(t, source)

View File

@@ -59,11 +59,11 @@ func TestMultiModuleLauncherUsesSelectedModuleAndProfile(t *testing.T) {
repository := newCLIRepository(t) repository := newCLIRepository(t)
copyExampleTree(t, example, repository) copyExampleTree(t, example, repository)
rootModule := "module example.com/multi-module-consumer\n\ngo 1.25.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.2.197\n" rootModule := "module example.com/multi-module-consumer\n\ngo 1.25.0\n\nrequire go.maximumdirect.net/releasekit v0.2.197\n"
selectedModule := "module example.com/multi-module-consumer/integrations/ckconfig\n\ngo 1.25.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.2.198\n" selectedModule := "module example.com/multi-module-consumer/integrations/ckconfig\n\ngo 1.25.0\n\nrequire go.maximumdirect.net/releasekit v0.2.198\n"
writeRepositoryFile(t, repository, "go.mod", rootModule) writeRepositoryFile(t, repository, "go.mod", rootModule)
writeRepositoryFile(t, repository, "integrations/ckconfig/go.mod", selectedModule) writeRepositoryFile(t, repository, "integrations/ckconfig/go.mod", selectedModule)
spaceModule := "module example.com/multi-module-consumer/integrations/ckconfig\n\ngo 1.25.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.2.299\n" spaceModule := "module example.com/multi-module-consumer/integrations/ckconfig\n\ngo 1.25.0\n\nrequire go.maximumdirect.net/releasekit v0.2.299\n"
writeRepositoryFile(t, repository, "integrations/ck config/go.mod", spaceModule) writeRepositoryFile(t, repository, "integrations/ck config/go.mod", spaceModule)
writeRepositoryFile(t, repository, "profiles/core release.json", `{"product":"Example Consumer Integration","module_dir":"integrations/ck config"}`) writeRepositoryFile(t, repository, "profiles/core release.json", `{"product":"Example Consumer Integration","module_dir":"integrations/ck config"}`)
cliGitRun(t, repository, "add", ".") cliGitRun(t, repository, "add", ".")
@@ -138,8 +138,8 @@ func TestMultiModuleLauncherBuildsToolFromSelectedDependency(t *testing.T) {
example := filepath.Join(cliRepositoryRoot(t), "examples", "multi-module") example := filepath.Join(cliRepositoryRoot(t), "examples", "multi-module")
repository := newCLIRepository(t) repository := newCLIRepository(t)
copyExampleTree(t, example, repository) copyExampleTree(t, example, repository)
writeRepositoryFile(t, repository, "go.mod", "module example.com/multi-module-consumer\n\ngo 1.25.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.2.197\n") writeRepositoryFile(t, repository, "go.mod", "module example.com/multi-module-consumer\n\ngo 1.25.0\n\nrequire go.maximumdirect.net/releasekit v0.2.197\n")
writeRepositoryFile(t, repository, "integrations/ckconfig/go.mod", "module example.com/multi-module-consumer/integrations/ckconfig\n\ngo 1.25.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit v0.2.198\n") writeRepositoryFile(t, repository, "integrations/ckconfig/go.mod", "module example.com/multi-module-consumer/integrations/ckconfig\n\ngo 1.25.0\n\nrequire go.maximumdirect.net/releasekit v0.2.198\n")
cliGitRun(t, repository, "add", ".") cliGitRun(t, repository, "add", ".")
cliGitRun(t, repository, "commit", "-m", "prepare selected tool module") cliGitRun(t, repository, "commit", "-m", "prepare selected tool module")

View File

@@ -15,7 +15,7 @@ import (
"sync" "sync"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit/internal/cli" "go.maximumdirect.net/releasekit/cmd/releasekit/internal/cli"
) )
func TestMultiModuleWoodpeckerDelivery(t *testing.T) { func TestMultiModuleWoodpeckerDelivery(t *testing.T) {
@@ -51,6 +51,7 @@ func TestMultiModuleWoodpeckerDelivery(t *testing.T) {
commit := tagAndPushWorkflowRepository(t, repository, tag) commit := tagAndPushWorkflowRepository(t, repository, tag)
delivery.update(func(delivery *mappedDeliveryData) { delivery.commit = commit }) delivery.update(func(delivery *mappedDeliveryData) { delivery.commit = commit })
env := multiModuleWorkflowEnvironment(t, repository, commit, tag, toolBinary, proxy) env := multiModuleWorkflowEnvironment(t, repository, commit, tag, toolBinary, proxy)
env["CI_COMMIT_SHA"] = cliGitOutput(t, repository, "rev-parse", "refs/tags/"+tag)
if output := runWoodpeckerBlock(t, command, repository, env); !strings.Contains(output, "state complete") || !strings.Contains(output, "tool-version=v0.2.197") { if output := runWoodpeckerBlock(t, command, repository, env); !strings.Contains(output, "state complete") || !strings.Contains(output, "tool-version=v0.2.197") {
t.Fatalf("tagged page delivery output = %q", output) t.Fatalf("tagged page delivery output = %q", output)
} }
@@ -301,7 +302,7 @@ func buildWorkflowCLI(t *testing.T, root string) string {
func writeWorkflowToolProxy(t *testing.T) string { func writeWorkflowToolProxy(t *testing.T) string {
t.Helper() t.Helper()
const module = "gitea.maximumdirect.net/eric/ReleaseKit" const module = "go.maximumdirect.net/releasekit"
const helper = "example.com/releasekit-helper" const helper = "example.com/releasekit-helper"
proxyDir := t.TempDir() proxyDir := t.TempDir()
moduleFile := "module " + module + "\n\ngo 1.25.0\n\nrequire " + helper + " v1.0.0\n" moduleFile := "module " + module + "\n\ngo 1.25.0\n\nrequire " + helper + " v1.0.0\n"
@@ -330,7 +331,7 @@ func main() {
`, helper, version) `, helper, version)
files := map[string]string{ files := map[string]string{
"cmd/releasekit/main.go": main, "cmd/releasekit/main.go": main,
"buildinfo/version.go": "package buildinfo\nimport \"gitea.maximumdirect.net/eric/ReleaseKit/internal/runtimeinfo\"\nfunc Version() string { return runtimeinfo.Version() }\n", "buildinfo/version.go": "package buildinfo\nimport \"go.maximumdirect.net/releasekit/internal/runtimeinfo\"\nfunc Version() string { return runtimeinfo.Version() }\n",
"internal/runtimeinfo/version.go": "package runtimeinfo\nvar injectedVersion string\nfunc Version() string { if injectedVersion != \"\" { return injectedVersion }; return \"dev\" }\n", "internal/runtimeinfo/version.go": "package runtimeinfo\nvar injectedVersion string\nfunc Version() string { if injectedVersion != \"\" { return injectedVersion }; return \"dev\" }\n",
} }
writeModuleProxyVersion(t, proxyDir, module, version, moduleFile, files) writeModuleProxyVersion(t, proxyDir, module, version, moduleFile, files)
@@ -361,7 +362,7 @@ func newWorkflowRepository(t *testing.T, example string) string {
} }
func workflowModuleFile(module, version string) string { func workflowModuleFile(module, version string) string {
return fmt.Sprintf("module %s\n\ngo 1.25.0\n\nrequire gitea.maximumdirect.net/eric/ReleaseKit %s\n", module, version) return fmt.Sprintf("module %s\n\ngo 1.25.0\n\nrequire go.maximumdirect.net/releasekit %s\n", module, version)
} }
func workflowDeliverySettings(baseURL string) *cli.DeliverySettings { func workflowDeliverySettings(baseURL string) *cli.DeliverySettings {
@@ -382,7 +383,7 @@ func tagAndPushWorkflowRepository(t *testing.T, repository, tag string) string {
cliGitRun(t, repository, "add", "--all") cliGitRun(t, repository, "add", "--all")
cliGitRun(t, repository, "commit", "-m", "prepare mapped delivery") cliGitRun(t, repository, "commit", "-m", "prepare mapped delivery")
commit := cliGitOutput(t, repository, "rev-parse", "HEAD") commit := cliGitOutput(t, repository, "rev-parse", "HEAD")
cliGitRun(t, repository, "tag", tag) cliGitRun(t, repository, "tag", "-a", tag, "-m", "mapped release")
remote := filepath.Join(filepath.Dir(repository), "origin.git") remote := filepath.Join(filepath.Dir(repository), "origin.git")
cliGitRun(t, repository, "init", "--bare", remote) cliGitRun(t, repository, "init", "--bare", remote)
cliGitRun(t, repository, "remote", "add", "origin", remote) cliGitRun(t, repository, "remote", "add", "origin", remote)
@@ -420,7 +421,7 @@ func prepareWorkflowModuleSum(t *testing.T, repository, moduleDir, proxy string)
return nil return nil
}) })
}) })
command := exec.Command("go", "mod", "download", "gitea.maximumdirect.net/eric/ReleaseKit@v0.2.197") command := exec.Command("go", "mod", "download", "go.maximumdirect.net/releasekit@v0.2.197")
command.Dir = filepath.Join(repository, filepath.FromSlash(moduleDir)) command.Dir = filepath.Join(repository, filepath.FromSlash(moduleDir))
command.Env = append(os.Environ(), "GOMODCACHE="+cache, "GOPROXY=file://"+filepath.ToSlash(proxy), "GOSUMDB=off", "GOWORK=off", "GOTOOLCHAIN=local", "GOFLAGS=-modcacherw") command.Env = append(os.Environ(), "GOMODCACHE="+cache, "GOPROXY=file://"+filepath.ToSlash(proxy), "GOSUMDB=off", "GOWORK=off", "GOTOOLCHAIN=local", "GOFLAGS=-modcacherw")
if output, err := command.CombinedOutput(); err != nil { if output, err := command.CombinedOutput(); err != nil {

View File

@@ -79,9 +79,9 @@ func TestReleaseCandidate(t *testing.T) {
"product": "ReleaseKit", "product": "ReleaseKit",
"checks": []map[string]any{{"args": []string{"sh", "-c", "if [ -n \"$RELEASEKIT_TEST_ARM_GIT_SHIM\" ]; then : > \"$RELEASEKIT_TEST_ARM_GIT_SHIM\"; fi"}}}, "checks": []map[string]any{{"args": []string{"sh", "-c", "if [ -n \"$RELEASEKIT_TEST_ARM_GIT_SHIM\" ]; then : > \"$RELEASEKIT_TEST_ARM_GIT_SHIM\"; fi"}}},
"delivery": map[string]any{ "delivery": map[string]any{
"base_url": "https://gitea.maximumdirect.net", "base_url": "https://forge.maximumdirect.net",
"owner": "eric", "owner": "base-layer",
"repository": "ReleaseKit", "repository": "releasekit",
"token_env": "RELEASEKIT_GITEA_TOKEN", "token_env": "RELEASEKIT_GITEA_TOKEN",
}, },
} }

View File

@@ -8,7 +8,7 @@ import (
"strings" "strings"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit/internal/cli" "go.maximumdirect.net/releasekit/cmd/releasekit/internal/cli"
) )
func TestReleaseKitSourceDeliveryWorkflowFromTaggedCheckout(t *testing.T) { func TestReleaseKitSourceDeliveryWorkflowFromTaggedCheckout(t *testing.T) {
@@ -24,7 +24,7 @@ func TestReleaseKitSourceDeliveryWorkflowFromTaggedCheckout(t *testing.T) {
if profile.Build != nil && len(profile.Build.Targets) != 0 { if profile.Build != nil && len(profile.Build.Targets) != 0 {
t.Fatalf("ReleaseKit profile declares binary targets: %#v", profile.Build.Targets) t.Fatalf("ReleaseKit profile declares binary targets: %#v", profile.Build.Targets)
} }
if profile.Delivery == nil || profile.Delivery.BaseURL != "https://gitea.maximumdirect.net" || profile.Delivery.Owner != "eric" || profile.Delivery.Repository != "ReleaseKit" || profile.Delivery.TokenEnv != "RELEASEKIT_GITEA_TOKEN" { if profile.Delivery == nil || profile.Delivery.BaseURL != "https://forge.maximumdirect.net" || profile.Delivery.Owner != "base-layer" || profile.Delivery.Repository != "releasekit" || profile.Delivery.TokenEnv != "RELEASEKIT_GITEA_TOKEN" {
t.Fatalf("ReleaseKit delivery profile = %#v", profile.Delivery) t.Fatalf("ReleaseKit delivery profile = %#v", profile.Delivery)
} }
repository := filepath.Join(t.TempDir(), "tagged ReleaseKit") repository := filepath.Join(t.TempDir(), "tagged ReleaseKit")
@@ -37,9 +37,9 @@ func TestReleaseKitSourceDeliveryWorkflowFromTaggedCheckout(t *testing.T) {
const version = "v1.2.3" const version = "v1.2.3"
note := "# ReleaseKit v1.2.3\n\nSource-only delivery fixture.\n\n" + note := "# ReleaseKit v1.2.3\n\nSource-only delivery fixture.\n\n" +
"[COPYRIGHT](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/v1.2.3/COPYRIGHT) |\n" + "[COPYRIGHT](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v1.2.3/COPYRIGHT) |\n" +
"[LICENSE](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/v1.2.3/LICENSE) |\n" + "[LICENSE](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v1.2.3/LICENSE) |\n" +
"[ATTRIBUTION](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/v1.2.3/docs/oss/attribution.md)\n" "[ATTRIBUTION](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v1.2.3/docs/oss/attribution.md)\n"
notePath := filepath.Join(repository, "docs", "releases", version+".md") notePath := filepath.Join(repository, "docs", "releases", version+".md")
if err := os.MkdirAll(filepath.Dir(notePath), 0o700); err != nil { if err := os.MkdirAll(filepath.Dir(notePath), 0o700); err != nil {
t.Fatal(err) t.Fatal(err)
@@ -78,7 +78,7 @@ func TestReleaseKitSourceDeliveryWorkflowFromTaggedCheckout(t *testing.T) {
} }
env := map[string]string{ env := map[string]string{
"CI_WORKSPACE": repository, "CI_WORKSPACE": repository,
"CI_COMMIT_SHA": state.snapshot().commit, "CI_COMMIT_SHA": cliGitOutput(t, repository, "rev-parse", "refs/tags/"+version),
"CI_COMMIT_TAG": version, "CI_COMMIT_TAG": version,
"RELEASEKIT_GITEA_TOKEN": "fixture-token", "RELEASEKIT_GITEA_TOKEN": "fixture-token",
"GOTOOLCHAIN": "local", "GOTOOLCHAIN": "local",

View File

@@ -15,7 +15,7 @@ import (
"sync/atomic" "sync/atomic"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit/internal/cli" "go.maximumdirect.net/releasekit/cmd/releasekit/internal/cli"
) )
func TestWoodpeckerTagDeliveryTemplate(t *testing.T) { func TestWoodpeckerTagDeliveryTemplate(t *testing.T) {
@@ -104,10 +104,14 @@ func TestWoodpeckerTagDeliveryTemplate(t *testing.T) {
repository := newCLIRepository(t) repository := newCLIRepository(t)
selectReleaseKitModule(t, repository, root, false) selectReleaseKitModule(t, repository, root, false)
commit := pushTaggedCLIRepository(t, repository) commit := pushTaggedCLIRepository(t, repository)
cliGitRun(t, repository, "commit", "--allow-empty", "-m", "unrelated event commit")
unrelated := cliGitOutput(t, repository, "rev-parse", "HEAD")
goDir, goLog := installControlledGoBootstrapShim(t) goDir, goLog := installControlledGoBootstrapShim(t)
env := templateEnvironment(repository, strings.Repeat("f", len(commit)), goDir, goLog) env := templateEnvironment(repository, unrelated, goDir, goLog)
if output, err := executeWoodpeckerBlock(command, repository, env); err == nil { if output, err := executeWoodpeckerBlock(command, repository, env); err == nil {
t.Fatalf("wrong tag succeeded: %s", output) t.Fatalf("wrong tag succeeded: %s", output)
} else if !strings.Contains(output, commit) || !strings.Contains(output, unrelated) {
t.Fatalf("tag mismatch omitted commit identities: %s", output)
} }
assertNoCommands(t, goLog) assertNoCommands(t, goLog)
}) })
@@ -126,26 +130,49 @@ func TestWoodpeckerTagDeliveryTemplate(t *testing.T) {
}) })
t.Run("selected executable receives event arguments and its status", func(t *testing.T) { t.Run("selected executable receives event arguments and its status", func(t *testing.T) {
repository := newCLIRepository(t) for _, event := range []struct {
selectReleaseKitModule(t, repository, root, false) name, tag string
commit := pushTaggedCLIRepository(t, repository) tagObject bool
goDir, goLog := installControlledGoBootstrapShim(t) }{
toolArgs := filepath.Join(t.TempDir(), "tool-arguments") {"lightweight commit", "v1.2.3", false},
env := templateEnvironment(repository, strings.ToUpper(commit), goDir, goLog) {"annotated commit", "v1.2.4", false},
env["RELEASEKIT_TOOL_ARGS_LOG"] = toolArgs {"annotated tag object", "v1.2.4", true},
env["RELEASEKIT_TOOL_EXIT"] = "37" } {
output, err := executeWoodpeckerBlock(command, repository, env) t.Run(event.name, func(t *testing.T) {
var exitError *exec.ExitError repository := newCLIRepository(t)
if !errors.As(err, &exitError) || exitError.ExitCode() != 37 { selectReleaseKitModule(t, repository, root, false)
t.Fatalf("template error = %v, want propagated exit 37; output=%q", err, output) commit := pushTaggedCLIRepository(t, repository)
if event.tag == "v1.2.4" {
cliGitRun(t, repository, "tag", "-a", event.tag, "-m", "annotated release")
cliGitRun(t, repository, "push", "origin", "refs/tags/"+event.tag)
}
eventID := commit
if event.tagObject {
eventID = cliGitOutput(t, repository, "rev-parse", "refs/tags/"+event.tag)
}
goDir, goLog := installControlledGoBootstrapShim(t)
toolArgs := filepath.Join(t.TempDir(), "tool-arguments")
env := templateEnvironment(repository, strings.ToUpper(eventID), goDir, goLog)
env["CI_COMMIT_TAG"] = event.tag
env["RELEASEKIT_TOOL_ARGS_LOG"] = toolArgs
env["RELEASEKIT_TOOL_EXIT"] = "37"
output, err := executeWoodpeckerBlock(command, repository, env)
var exitError *exec.ExitError
if !errors.As(err, &exitError) || exitError.ExitCode() != 37 {
t.Fatalf("template error = %v, want propagated exit 37; output=%q", err, output)
}
args := readWoodpeckerFixtureFile(t, toolArgs)
for _, expected := range []string{"<ci-deliver>", "<--repo>", "<" + repository + ">", "<--prepared>", "<" + event.tag + ">"} {
if !strings.Contains(args, expected) {
t.Errorf("selected executable arguments %q omit %q", args, expected)
}
}
if !strings.Contains(strings.ToLower(args), "<--commit>\n<"+commit+">") {
t.Errorf("selected executable did not receive source commit %s: %q", commit, args)
}
assertGoSelection(t, repository, goLog)
})
} }
args := readWoodpeckerFixtureFile(t, toolArgs)
for _, expected := range []string{"<ci-deliver>", "<--repo>", "<" + repository + ">", "<--prepared>", "<--commit>", "<" + strings.ToUpper(commit) + ">", "<v1.2.3>"} {
if !strings.Contains(args, expected) {
t.Errorf("selected executable arguments %q omit %q", args, expected)
}
}
assertGoSelection(t, repository, goLog)
}) })
} }
@@ -178,7 +205,7 @@ func TestWoodpeckerTagDeliveryUsesTaggedModuleVersion(t *testing.T) {
t.Run("older tag retry uses its committed module selection", func(t *testing.T) { t.Run("older tag retry uses its committed module selection", func(t *testing.T) {
goDir, goLog := installGoBootstrapShim(t) goDir, goLog := installGoBootstrapShim(t)
repository := newCLIRepository(t) repository := newCLIRepository(t)
const module = "gitea.maximumdirect.net/eric/ReleaseKit" const module = "go.maximumdirect.net/releasekit"
writeRepositoryFile(t, repository, "go.mod", "module example.com/cli-candidate\n\ngo 1.25.0\n\nrequire "+module+" v0.2.197\n") writeRepositoryFile(t, repository, "go.mod", "module example.com/cli-candidate\n\ngo 1.25.0\n\nrequire "+module+" v0.2.197\n")
cliGitRun(t, repository, "add", "go.mod") cliGitRun(t, repository, "add", "go.mod")
cliGitRun(t, repository, "commit", "-m", "select the earlier ReleaseKit version") cliGitRun(t, repository, "commit", "-m", "select the earlier ReleaseKit version")
@@ -212,7 +239,7 @@ func TestWoodpeckerTagDeliveryUsesTaggedModuleVersion(t *testing.T) {
t.Run("versioned replacement selects its declared source", func(t *testing.T) { t.Run("versioned replacement selects its declared source", func(t *testing.T) {
goDir, goLog := installGoBootstrapShim(t) goDir, goLog := installGoBootstrapShim(t)
repository := newCLIRepository(t) repository := newCLIRepository(t)
const module = "gitea.maximumdirect.net/eric/ReleaseKit" const module = "go.maximumdirect.net/releasekit"
goMod := "module example.com/cli-candidate\n\ngo 1.25.0\n\nrequire " + module + " v0.2.197\n\nreplace " + module + " v0.2.197 => " + module + " v0.2.198\n" goMod := "module example.com/cli-candidate\n\ngo 1.25.0\n\nrequire " + module + " v0.2.197\n\nreplace " + module + " v0.2.197 => " + module + " v0.2.198\n"
writeRepositoryFile(t, repository, "go.mod", goMod) writeRepositoryFile(t, repository, "go.mod", goMod)
cliGitRun(t, repository, "add", "go.mod") cliGitRun(t, repository, "add", "go.mod")
@@ -453,7 +480,7 @@ func templateEnvironment(repository, commit, shimDir, goLog string) map[string]s
"CI_COMMIT_SHA": commit, "CI_COMMIT_SHA": commit,
"CI_COMMIT_TAG": "v1.2.3", "CI_COMMIT_TAG": "v1.2.3",
"RELEASEKIT_GITEA_TOKEN": "fixture-token", "RELEASEKIT_GITEA_TOKEN": "fixture-token",
"RELEASEKIT_MODULE": "gitea.maximumdirect.net/eric/ReleaseKit", "RELEASEKIT_MODULE": "go.maximumdirect.net/releasekit",
"RELEASEKIT_REAL_GO": realGo, "RELEASEKIT_REAL_GO": realGo,
"RELEASEKIT_GO_LOG": goLog, "RELEASEKIT_GO_LOG": goLog,
"GOTOOLCHAIN": "local", "GOTOOLCHAIN": "local",
@@ -486,7 +513,7 @@ func executeWoodpeckerBlock(block, repository string, environment map[string]str
func selectReleaseKitModule(t *testing.T, repository, releaseKitSource string, includeSum bool) { func selectReleaseKitModule(t *testing.T, repository, releaseKitSource string, includeSum bool) {
t.Helper() t.Helper()
const module = "gitea.maximumdirect.net/eric/ReleaseKit" const module = "go.maximumdirect.net/releasekit"
goMod := fmt.Sprintf("module example.com/tagged-app\n\ngo 1.26.0\n\nrequire %s v0.2.0\n\nreplace %s => %s\n", module, module, strconv.Quote(releaseKitSource)) goMod := fmt.Sprintf("module example.com/tagged-app\n\ngo 1.26.0\n\nrequire %s v0.2.0\n\nreplace %s => %s\n", module, module, strconv.Quote(releaseKitSource))
writeRepositoryFile(t, repository, "go.mod", goMod) writeRepositoryFile(t, repository, "go.mod", goMod)
cliGitRun(t, repository, "add", "go.mod") cliGitRun(t, repository, "add", "go.mod")
@@ -499,7 +526,7 @@ func selectReleaseKitModule(t *testing.T, repository, releaseKitSource string, i
func writeReleaseKitModuleProxy(t *testing.T) string { func writeReleaseKitModuleProxy(t *testing.T) string {
t.Helper() t.Helper()
const module = "gitea.maximumdirect.net/eric/ReleaseKit" const module = "go.maximumdirect.net/releasekit"
const toolDependency = "example.com/releasekit-helper" const toolDependency = "example.com/releasekit-helper"
proxyDir := t.TempDir() proxyDir := t.TempDir()
toolModule := "module " + module + "\n\ngo 1.25.0\n\nrequire " + toolDependency + " v1.0.0\n" toolModule := "module " + module + "\n\ngo 1.25.0\n\nrequire " + toolDependency + " v1.0.0\n"
@@ -607,7 +634,7 @@ func assertGoSelection(t *testing.T, repository, goLog string) {
log := readWoodpeckerFixtureFile(t, goLog) log := readWoodpeckerFixtureFile(t, goLog)
list := "list -mod=mod -modfile=" list := "list -mod=mod -modfile="
build := "build -mod=mod -modfile=" build := "build -mod=mod -modfile="
module := "gitea.maximumdirect.net/eric/ReleaseKit" module := "go.maximumdirect.net/releasekit"
if !strings.Contains(log, "GOWORK=off GOTOOLCHAIN=local") || !strings.Contains(log, list) || !strings.Contains(log, "-m "+module) { if !strings.Contains(log, "GOWORK=off GOTOOLCHAIN=local") || !strings.Contains(log, list) || !strings.Contains(log, "-m "+module) {
t.Fatalf("Go module selection command is missing required settings: %q", log) t.Fatalf("Go module selection command is missing required settings: %q", log)
} }

View File

@@ -4,9 +4,9 @@ import (
"context" "context"
"io" "io"
internalbuild "gitea.maximumdirect.net/eric/ReleaseKit/internal/build" internalbuild "go.maximumdirect.net/releasekit/internal/build"
internaldelivery "gitea.maximumdirect.net/eric/ReleaseKit/internal/delivery" internaldelivery "go.maximumdirect.net/releasekit/internal/delivery"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gitea" "go.maximumdirect.net/releasekit/internal/gitea"
) )
// DeliveryState describes the result of one delivery invocation. // DeliveryState describes the result of one delivery invocation.

View File

@@ -8,7 +8,7 @@ import (
"syscall" "syscall"
"testing" "testing"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
) )
func TestDeliverReadsLocalBinaryOnceForVerificationAndOnceForUpload(t *testing.T) { func TestDeliverReadsLocalBinaryOnceForVerificationAndOnceForUpload(t *testing.T) {

View File

@@ -16,7 +16,7 @@ import (
"sync" "sync"
"testing" "testing"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
) )
func TestDeliverManagedBuildUploadsArtifactsAndCleansTemporaryOutput(t *testing.T) { func TestDeliverManagedBuildUploadsArtifactsAndCleansTemporaryOutput(t *testing.T) {
@@ -323,7 +323,7 @@ func newTwoModuleDeliveryConsumer(t *testing.T) string {
import ( import (
"fmt" "fmt"
"os" "os"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { if len(os.Args) == 2 && os.Args[1] == "version" { fmt.Println("fixture", buildinfo.Version()) } } func main() { if len(os.Args) == 2 && os.Args[1] == "version" { fmt.Println("fixture", buildinfo.Version()) } }
`) `)
@@ -564,7 +564,7 @@ func newTaggedDeliveryConsumerWithNote(t *testing.T, note string) string {
import ( import (
"fmt" "fmt"
"os" "os"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { if len(os.Args) == 2 && os.Args[1] == "version" { fmt.Println("fixture", buildinfo.Version()) } } func main() { if len(os.Args) == 2 && os.Args[1] == "version" { fmt.Println("fixture", buildinfo.Version()) } }
`) `)

View File

@@ -241,8 +241,11 @@ changes the selected checkout; `--prepared` reuses a verified checkout.
Ordinary `deliver` continues to operate on already prepared source without Ordinary `deliver` continues to operate on already prepared source without
fetching, checking out, or downloading dependencies. fetching, checking out, or downloading dependencies.
In Woodpecker, pass `CI_WORKSPACE`, `CI_COMMIT_SHA`, and `CI_COMMIT_TAG` as the In Woodpecker, pass `CI_WORKSPACE`, the source commit resolved from
repository, expected commit, and full tag arguments. The CLI does not read `CI_COMMIT_SHA`, and `CI_COMMIT_TAG` as the repository, expected commit, and full
tag arguments. The event ID may identify an annotated tag object; see the
[delivery guide](consumers/delivery.md#woodpecker-tag-workflows) for resolution
and workflow preparation. The CLI does not read
provider-specific environment variable names. Checkout and dependency provider-specific environment variable names. Checkout and dependency
preparation failures return status 1; usage, profile, credential, and invalid preparation failures return status 1; usage, profile, credential, and invalid
version errors return status 2. Final delivery uses the same statuses as version errors return status 2. Final delivery uses the same statuses as

View File

@@ -10,12 +10,14 @@ From the consumer module's root, select the ReleaseKit version to adopt:
```sh ```sh
: "${RELEASEKIT_TOOL_VERSION:?Set the released ReleaseKit version to adopt}" : "${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 mod tidy
go tool releasekit version go tool releasekit version
``` ```
Select a release that implements the API, profile, and workflow you are adopting. 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; The module-release interface requires a release containing that feature;
pre-feature versions through v0.3.0 use their corresponding historical interface. pre-feature versions through v0.3.0 use their corresponding historical interface.
Go records the executable package in Go records the executable package in
@@ -43,13 +45,47 @@ required imports and select the module version:
```sh ```sh
: "${RELEASEKIT_TOOL_VERSION:?Set the released ReleaseKit version to adopt}" : "${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 go mod tidy
``` ```
API consumers can also register the CLI with `go get -tool` as above. Both uses API consumers can also register the CLI with `go get -tool` as above. Both uses
share the module-selected ReleaseKit version. 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 ## CI adoption
The maintained [consumer tag-delivery workflow](delivery.md#woodpecker-tag-workflows) The maintained [consumer tag-delivery workflow](delivery.md#woodpecker-tag-workflows)

View File

@@ -8,7 +8,7 @@ import (
"context" "context"
"fmt" "fmt"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
) )
func build(ctx context.Context) error { func build(ctx context.Context) error {

View File

@@ -196,14 +196,16 @@ a `delivery` profile. Page-only and binary behavior both use this template; the
profile's build target list selects whether application binaries are built and profile's build target list selects whether application binaries are built and
delivered. delivered.
Before running Go, the template fetches the explicit event tag, compares its Before running Go, the template fetches the explicit event tag and independently
peeled commit with the provider's full commit ID without regard to hex case, resolves both the tag and `CI_COMMIT_SHA` to source commits. The event ID may
checks out that commit detached, and confirms the source tree is clean. It then identify an annotated tag object or a commit. The template requires the resolved
copies the tagged `go.mod` and any `go.sum` to a temporary directory outside commits to match, checks out that commit detached, and confirms the source tree
the checkout. `go list -m` confirms that the module selects ReleaseKit; Go uses is clean. It then copies the tagged `go.mod` and any `go.sum` to a temporary
directory outside the checkout. `go list -m` confirms that the module selects
ReleaseKit; Go uses
an alternate `-modfile` to prepare dependencies and build the selected an alternate `-modfile` to prepare dependencies and build the selected
`cmd/releasekit` package without changing the tagged module files. The template `cmd/releasekit` package without changing the tagged module files. The template
invokes that executable with `CI_WORKSPACE`, `CI_COMMIT_SHA`, and invokes that executable with `CI_WORKSPACE`, the resolved event commit, and
`CI_COMMIT_TAG`. A cleanup trap removes the temporary metadata and executable. `CI_COMMIT_TAG`. A cleanup trap removes the temporary metadata and executable.
Tool bootstrap and application artifact preparation are separate. The bootstrap Tool bootstrap and application artifact preparation are separate. The bootstrap
@@ -242,11 +244,13 @@ and application artifact compilation retain their separate environments.
The normal Go module and build caches are sufficient. Cache mounts may be added 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 as deployment configuration when they help the runner; they are not needed by
the template. A separately installed executable can be installed with 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 same arguments. With the event object available in the CI checkout,
resolve it to its source commit before invocation:
```sh ```sh
releasekit ci-deliver --repo "$CI_WORKSPACE" --commit "$CI_COMMIT_SHA" "$CI_COMMIT_TAG" expected_commit=$(git -C "$CI_WORKSPACE" rev-parse --verify "${CI_COMMIT_SHA}^{commit}")
releasekit ci-deliver --repo "$CI_WORKSPACE" --commit "$expected_commit" "$CI_COMMIT_TAG"
``` ```
The module-based workflow follows the ReleaseKit version selected by the tagged The module-based workflow follows the ReleaseKit version selected by the tagged
@@ -255,6 +259,12 @@ consumer module configuration when adopting a newer ReleaseKit version and
verify it with a tag fixture. The command and profile behavior are documented verify it with a tag fixture. The command and profile behavior are documented
in the [CLI contract](../cli.md) and [configuration reference](../config.md). in the [CLI contract](../cli.md) and [configuration reference](../config.md).
Update copied workflow YAML when adopting corrected examples. A dependency
upgrade alone leaves that copy unchanged. An older tagged workflow that passes
a raw annotated tag object ID still fails on retry. Recover delivery from the
original tagged source with the resolved event commit through the command above,
preserving the published tag and existing content.
Woodpecker runs delivery after the tag event, independently from the source Woodpecker runs delivery after the tag event, independently from the source
publication result. Read its workflow status as delivery status: a delivery publication result. Read its workflow status as delivery status: a delivery
failure does not undo source publication. A failed, partial, or uncertain run failure does not undo source publication. A failed, partial, or uncertain run
@@ -276,7 +286,9 @@ describes these checks.
To isolate a public ReleaseKit download from application settings and the To isolate a public ReleaseKit download from application settings and the
existing module cache, run the following with a compatible local Go toolchain. 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. Go proxy and checksum database and retains its temporary directory for inspection.
```sh ```sh
@@ -288,7 +300,7 @@ Go proxy and checksum database and retains its temporary directory for inspectio
GOPRIVATE= GONOPROXY= GONOSUMDB= \ GOPRIVATE= GONOPROXY= GONOSUMDB= \
GOPROXY=https://proxy.golang.org GOSUMDB=sum.golang.org \ GOPROXY=https://proxy.golang.org GOSUMDB=sum.golang.org \
GOMODCACHE="$checksum_dir/modules" \ 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
) )
``` ```

View File

@@ -4,7 +4,7 @@ Applications can read their embedded version through the public `buildinfo`
package: package:
```go ```go
import "gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" import "go.maximumdirect.net/releasekit/buildinfo"
version := buildinfo.Version() version := buildinfo.Version()
``` ```

View File

@@ -24,7 +24,7 @@ Go declarations and GoDoc remain the owners of exact exported contracts.
## Module and dependencies ## Module and dependencies
The module is `gitea.maximumdirect.net/eric/ReleaseKit`, with Go language The module is `go.maximumdirect.net/releasekit`, with Go language
version `1.26.0`. `go.mod` requires `golang.org/x/mod` and Goldmark for internal version `1.26.0`. `go.mod` requires `golang.org/x/mod` and Goldmark for internal
validation; public facades do not expose either dependency. `go list ./...` validation; public facades do not expose either dependency. `go list ./...`
reports these implemented packages: reports these implemented packages:

View File

@@ -5,14 +5,16 @@ the complete checked-in release note. The page is delivered asynchronously by
the prepared [Woodpecker workflow](../examples/woodpecker/releasekit-source-delivery.yml); the prepared [Woodpecker workflow](../examples/woodpecker/releasekit-source-delivery.yml);
it is not a source-release completion check and carries no binary assets. The it is not a source-release completion check and carries no binary assets. The
authoritative repository is `origin` at authoritative repository is `origin` at
`https://gitea.maximumdirect.net/eric/ReleaseKit.git`, and the release branch `ssh://git@forge.maximumdirect.net:22222/base-layer/releasekit.git`, and the release
is `main`. A release completes when the intended annotated tag is successfully branch is `main`. The hosted Gitea destination is
`https://forge.maximumdirect.net/base-layer/releasekit`. A release completes
when the intended annotated tag is successfully
pushed, or when one exact-object recovery query confirms that the push pushed, or when one exact-object recovery query confirms that the push
succeeded. CI and consumer installation are not completion checks. succeeded. CI and consumer installation are not completion checks.
## Prepare a candidate ## Prepare a candidate
Use a clean clone on `main`. The chosen build toolchain is Go 1.26.8. Make that Use a clean clone on `main`. The chosen build toolchain is Go 1.26.10. Make that
local installation the active `go` command for preparation, building the release local installation the active `go` command for preparation, building the release
executable, and candidate validation: executable, and candidate validation:
@@ -43,9 +45,9 @@ the exact version. Summarize the change and any compatibility or upgrade impact.
End the note with the three license links at the immutable source tag: End the note with the three license links at the immutable source tag:
```markdown ```markdown
[COPYRIGHT](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/vX.Y.Z/COPYRIGHT) | [COPYRIGHT](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/vX.Y.Z/COPYRIGHT) |
[LICENSE](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/vX.Y.Z/LICENSE) | [LICENSE](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/vX.Y.Z/LICENSE) |
[ATTRIBUTION](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/vX.Y.Z/docs/oss/attribution.md) [ATTRIBUTION](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/vX.Y.Z/docs/oss/attribution.md)
``` ```
Replace every `vX.Y.Z` with the selected version. These are links to the same Replace every `vX.Y.Z` with the selected version. These are links to the same

36
docs/releases/v0.4.2.md Normal file
View File

@@ -0,0 +1,36 @@
# ReleaseKit v0.4.2
## Summary
This patch corrects Woodpecker delivery bootstrap for events whose
`CI_COMMIT_SHA` identifies an annotated tag object. The maintained workflows
resolve the event object to its source commit before verification and delivery.
## Changes
- Correct module-selected, multi-module, and ReleaseKit source delivery
workflows to resolve event and tag commits independently and pass the
resolved event commit to `ci-deliver`.
- Report both commit identities when an event and its selected tag disagree.
- Extend executable-workflow regression coverage for annotated tag-object
events, annotated and lightweight commit events, resolved delivery arguments,
and rejection of unrelated commits.
## Compatibility and upgrade guidance
Public APIs, CLI contracts, configuration formats, and the Go 1.26.0 consumer
minimum retain their v0.4 definitions. `ci-deliver --commit` continues to accept
the expected source commit ID.
Update copied workflow YAML from the maintained examples when adopting this
patch. Upgrading the ReleaseKit dependency alone leaves copied workflows
unchanged. The [delivery guide](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/v0.4.2/docs/consumers/delivery.md#woodpecker-tag-workflows)
describes event resolution, workflow adoption, and delivery recovery.
Existing published tags and contents remain unchanged. Recover a failed older
workflow from its original tagged source using the resolved event commit through
the documented delivery command, preserving existing hosted content.
[COPYRIGHT](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/v0.4.2/COPYRIGHT) |
[LICENSE](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/v0.4.2/LICENSE) |
[ATTRIBUTION](https://gitea.maximumdirect.net/eric/ReleaseKit/src/tag/v0.4.2/docs/oss/attribution.md)

59
docs/releases/v0.5.0.md Normal file
View File

@@ -0,0 +1,59 @@
# ReleaseKit v0.5.0
## Summary
ReleaseKit adopts `go.maximumdirect.net/releasekit` as its Go module identifier.
The vanity path resolves to the Gitea repository at
`https://forge.maximumdirect.net/base-layer/releasekit`.
## Changes
- The orchestration facade is `go.maximumdirect.net/releasekit`, the runtime
facade is `go.maximumdirect.net/releasekit/buildinfo`, and the executable
package is `go.maximumdirect.net/releasekit/cmd/releasekit`.
- Imports, version-injection linkage, compiled API checks, consumer fixtures,
and maintained release launchers and Woodpecker workflows use the new module
identity.
- ReleaseKit's hosted-page delivery profile and maintainer guidance use Gitea
at `forge.maximumdirect.net`, owner `base-layer`, repository `releasekit`.
## Compatibility
This pre-1.0 minor release changes package import paths and requires consumer
migration. Facade roles, command behavior, configuration formats, and the Go
1.26.0 consumer minimum retain their existing definitions. The runtime version
accessor and builder use the new module's runtime implementation for injection.
Packages imported through different module paths have distinct Go identities.
Coordinate import changes in packages that exchange ReleaseKit facade types,
and update builders and applications using `buildinfo` together.
Published versions through v0.4.2 retain the original
`gitea.maximumdirect.net/eric/ReleaseKit` module declaration. Those versions
continue to describe their original source and use their matching historical
instructions. A vanity-path download of an older tag does not change its module
declaration.
## Upgrade guidance
1. Update application, library, test, and generated imports for the root facade
and `buildinfo` to the new paths. Select v0.5.0 or a later compatible release
using the [adoption guide](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.5.0/docs/consumers/adoption.md#migrating-from-the-original-module-path).
2. For CLI tool dependencies, remove the old tool declaration and register
`go.maximumdirect.net/releasekit/cmd/releasekit` at the selected version.
3. Update copied launchers and Woodpecker workflows together with the module
selection. The maintained examples use
`releasekit_module=go.maximumdirect.net/releasekit`.
4. Run `go mod tidy`, review any old-path dependencies retained transitively,
and commit module and workflow changes together. Keep existing consumer tags
intact; their delivery retries use their recorded module files and matching
workflows.
Source repository and hosted release URLs use the Gitea host; Go imports and
tool dependencies use the vanity path. ReleaseKit's source publication and
hosted-page delivery retain their separate outcomes under the
[maintainer procedure](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.5.0/docs/release.md).
[COPYRIGHT](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.5.0/COPYRIGHT) |
[LICENSE](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.5.0/LICENSE) |
[ATTRIBUTION](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.5.0/docs/oss/attribution.md)

View File

@@ -15,13 +15,13 @@ minimum.
## Select the release tool ## Select the release tool
The module files are setup skeletons. Set `RELEASEKIT_TOOL_VERSION` to a released The module files are setup skeletons. Set `RELEASEKIT_TOOL_VERSION` to a released
ReleaseKit version containing module-release support, then register that tool in ReleaseKit version at or after the v0.5.0 vanity-path migration, then register
each consumer module before running the launcher or workflow: that tool in each consumer module before running the launcher or workflow:
```sh ```sh
: "${RELEASEKIT_TOOL_VERSION:?Select a ReleaseKit release with module-release support}" : "${RELEASEKIT_TOOL_VERSION:?Select a ReleaseKit release with module-release support}"
for module_dir in . integrations/ckconfig integrations/core/v2; do for module_dir in . integrations/ckconfig integrations/core/v2; do
go -C "$module_dir" get -tool "gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit@${RELEASEKIT_TOOL_VERSION}" go -C "$module_dir" get -tool "go.maximumdirect.net/releasekit/cmd/releasekit@${RELEASEKIT_TOOL_VERSION}"
go -C "$module_dir" mod tidy go -C "$module_dir" mod tidy
done done
``` ```
@@ -108,9 +108,9 @@ modules:
: "${RELEASEKIT_SOURCE:?Set the absolute ReleaseKit checkout path}" : "${RELEASEKIT_SOURCE:?Set the absolute ReleaseKit checkout path}"
for module_dir in . integrations/ckconfig integrations/core/v2; do for module_dir in . integrations/ckconfig integrations/core/v2; do
go -C "$module_dir" mod edit \ go -C "$module_dir" mod edit \
-require=gitea.maximumdirect.net/eric/ReleaseKit@v0.0.0 \ -require=go.maximumdirect.net/releasekit@v0.0.0 \
-replace="gitea.maximumdirect.net/eric/ReleaseKit=$RELEASEKIT_SOURCE" \ -replace="go.maximumdirect.net/releasekit=$RELEASEKIT_SOURCE" \
-tool=gitea.maximumdirect.net/eric/ReleaseKit/cmd/releasekit -tool=go.maximumdirect.net/releasekit/cmd/releasekit
GOTOOLCHAIN=local GOWORK=off go -C "$module_dir" mod tidy GOTOOLCHAIN=local GOWORK=off go -C "$module_dir" mod tidy
done done
``` ```

View File

@@ -3,7 +3,7 @@ package main
import ( import (
"fmt" "fmt"
"gitea.maximumdirect.net/eric/ReleaseKit/buildinfo" "go.maximumdirect.net/releasekit/buildinfo"
) )
func main() { func main() {

View File

@@ -31,7 +31,7 @@ else
: > "$bootstrap_dir/releasekit.sum" : > "$bootstrap_dir/releasekit.sum"
fi fi
releasekit_module=gitea.maximumdirect.net/eric/ReleaseKit releasekit_module=go.maximumdirect.net/releasekit
( (
cd "$module_path" cd "$module_path"
export GOWORK=off export GOWORK=off

View File

@@ -8,7 +8,7 @@ when:
steps: steps:
- name: deliver - name: deliver
image: golang:1.26.8-bookworm image: golang:1.26.10-bookworm
environment: environment:
RELEASEKIT_GITEA_TOKEN: RELEASEKIT_GITEA_TOKEN:
from_secret: releasekit_gitea_token from_secret: releasekit_gitea_token
@@ -20,8 +20,12 @@ steps:
git check-ref-format "refs/tags/$${CI_COMMIT_TAG}" git check-ref-format "refs/tags/$${CI_COMMIT_TAG}"
git fetch origin "refs/tags/$${CI_COMMIT_TAG}:refs/tags/$${CI_COMMIT_TAG}" git fetch origin "refs/tags/$${CI_COMMIT_TAG}:refs/tags/$${CI_COMMIT_TAG}"
tag_commit=$(git rev-parse --verify "refs/tags/$${CI_COMMIT_TAG}^{commit}") tag_commit=$(git rev-parse --verify "refs/tags/$${CI_COMMIT_TAG}^{commit}")
expected_commit=$(printf '%s' "$${CI_COMMIT_SHA}" | tr '[:upper:]' '[:lower:]') expected_commit=$(git rev-parse --verify "$${CI_COMMIT_SHA}^{commit}")
test "$(printf '%s' "$${tag_commit}" | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}" if [ "$${tag_commit}" != "$${expected_commit}" ]; then
printf 'Tag %s resolves to commit %s; event %s resolves to commit %s\n' \
"$${CI_COMMIT_TAG}" "$${tag_commit}" "$${CI_COMMIT_SHA}" "$${expected_commit}" >&2
exit 1
fi
git checkout --detach "$${tag_commit}" git checkout --detach "$${tag_commit}"
test "$(git rev-parse HEAD | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}" test "$(git rev-parse HEAD | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}"
test -z "$(git status --porcelain --untracked-files=all)" test -z "$(git status --porcelain --untracked-files=all)"
@@ -47,7 +51,7 @@ steps:
export GOWORK=off export GOWORK=off
export GOTOOLCHAIN=local export GOTOOLCHAIN=local
releasekit_module=gitea.maximumdirect.net/eric/ReleaseKit releasekit_module=go.maximumdirect.net/releasekit
( (
cd "$${module_path}" cd "$${module_path}"
go list -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" -m "$${releasekit_module}" go list -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" -m "$${releasekit_module}"
@@ -59,5 +63,5 @@ steps:
--config "$${profile_path}" \ --config "$${profile_path}" \
--expected-module "$${module_dir}" \ --expected-module "$${module_dir}" \
--prepared \ --prepared \
--commit "$${CI_COMMIT_SHA}" \ --commit "$${expected_commit}" \
"$${CI_COMMIT_TAG}" "$${CI_COMMIT_TAG}"

View File

@@ -4,7 +4,7 @@ when:
steps: steps:
- name: deliver - name: deliver
image: golang:1.26.8-bookworm image: golang:1.26.10-bookworm
environment: environment:
RELEASEKIT_GITEA_TOKEN: RELEASEKIT_GITEA_TOKEN:
from_secret: releasekit_gitea_token from_secret: releasekit_gitea_token
@@ -15,9 +15,13 @@ steps:
test -n "$${CI_COMMIT_SHA}" test -n "$${CI_COMMIT_SHA}"
git check-ref-format "refs/tags/$${CI_COMMIT_TAG}" git check-ref-format "refs/tags/$${CI_COMMIT_TAG}"
git fetch origin "refs/tags/$${CI_COMMIT_TAG}:refs/tags/$${CI_COMMIT_TAG}" git fetch origin "refs/tags/$${CI_COMMIT_TAG}:refs/tags/$${CI_COMMIT_TAG}"
tag_commit=$(git rev-parse "refs/tags/$${CI_COMMIT_TAG}^{commit}") tag_commit=$(git rev-parse --verify "refs/tags/$${CI_COMMIT_TAG}^{commit}")
expected_commit=$(printf '%s' "$${CI_COMMIT_SHA}" | tr '[:upper:]' '[:lower:]') expected_commit=$(git rev-parse --verify "$${CI_COMMIT_SHA}^{commit}")
test "$(printf '%s' "$${tag_commit}" | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}" if [ "$${tag_commit}" != "$${expected_commit}" ]; then
printf 'Tag %s resolves to commit %s; event %s resolves to commit %s\n' \
"$${CI_COMMIT_TAG}" "$${tag_commit}" "$${CI_COMMIT_SHA}" "$${expected_commit}" >&2
exit 1
fi
git checkout --detach "$${tag_commit}" git checkout --detach "$${tag_commit}"
test "$(git rev-parse HEAD | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}" test "$(git rev-parse HEAD | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}"
test -z "$(git status --porcelain --untracked-files=all)" test -z "$(git status --porcelain --untracked-files=all)"
@@ -30,5 +34,5 @@ steps:
"$${bootstrap_dir}/releasekit" ci-deliver \ "$${bootstrap_dir}/releasekit" ci-deliver \
--repo "$${CI_WORKSPACE}" \ --repo "$${CI_WORKSPACE}" \
--prepared \ --prepared \
--commit "$${CI_COMMIT_SHA}" \ --commit "$${expected_commit}" \
"$${CI_COMMIT_TAG}" "$${CI_COMMIT_TAG}"

View File

@@ -1,6 +1,6 @@
matrix: matrix:
include: include:
- GO_IMAGE: golang:1.26.8-bookworm - GO_IMAGE: golang:1.26.10-bookworm
when: when:
- event: tag - event: tag
@@ -19,9 +19,13 @@ steps:
test -n "$${CI_COMMIT_SHA}" test -n "$${CI_COMMIT_SHA}"
git check-ref-format "refs/tags/$${CI_COMMIT_TAG}" git check-ref-format "refs/tags/$${CI_COMMIT_TAG}"
git fetch origin "refs/tags/$${CI_COMMIT_TAG}:refs/tags/$${CI_COMMIT_TAG}" git fetch origin "refs/tags/$${CI_COMMIT_TAG}:refs/tags/$${CI_COMMIT_TAG}"
tag_commit=$(git rev-parse "refs/tags/$${CI_COMMIT_TAG}^{commit}") tag_commit=$(git rev-parse --verify "refs/tags/$${CI_COMMIT_TAG}^{commit}")
expected_commit=$(printf '%s' "$${CI_COMMIT_SHA}" | tr '[:upper:]' '[:lower:]') expected_commit=$(git rev-parse --verify "$${CI_COMMIT_SHA}^{commit}")
test "$(printf '%s' "$${tag_commit}" | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}" if [ "$${tag_commit}" != "$${expected_commit}" ]; then
printf 'Tag %s resolves to commit %s; event %s resolves to commit %s\n' \
"$${CI_COMMIT_TAG}" "$${tag_commit}" "$${CI_COMMIT_SHA}" "$${expected_commit}" >&2
exit 1
fi
git checkout --detach "$${tag_commit}" git checkout --detach "$${tag_commit}"
test "$(git rev-parse HEAD | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}" test "$(git rev-parse HEAD | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}"
test -z "$(git status --porcelain --untracked-files=all)" test -z "$(git status --porcelain --untracked-files=all)"
@@ -39,12 +43,12 @@ steps:
export GOWORK=off export GOWORK=off
export GOTOOLCHAIN=local export GOTOOLCHAIN=local
releasekit_module=gitea.maximumdirect.net/eric/ReleaseKit releasekit_module=go.maximumdirect.net/releasekit
go list -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" -m "$${releasekit_module}" go list -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" -m "$${releasekit_module}"
go build -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" \ go build -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" \
-o "$${bootstrap_dir}/releasekit" "$${releasekit_module}/cmd/releasekit" -o "$${bootstrap_dir}/releasekit" "$${releasekit_module}/cmd/releasekit"
"$${bootstrap_dir}/releasekit" ci-deliver \ "$${bootstrap_dir}/releasekit" ci-deliver \
--repo "$${CI_WORKSPACE}" \ --repo "$${CI_WORKSPACE}" \
--prepared \ --prepared \
--commit "$${CI_COMMIT_SHA}" \ --commit "$${expected_commit}" \
"$${CI_COMMIT_TAG}" "$${CI_COMMIT_TAG}"

2
go.mod
View File

@@ -1,4 +1,4 @@
module gitea.maximumdirect.net/eric/ReleaseKit module go.maximumdirect.net/releasekit
go 1.26.0 go 1.26.0

View File

@@ -15,7 +15,7 @@ import (
"strings" "strings"
) )
const modulePath = "gitea.maximumdirect.net/eric/ReleaseKit" const modulePath = "go.maximumdirect.net/releasekit"
var facades = []string{modulePath, modulePath + "/buildinfo"} var facades = []string{modulePath, modulePath + "/buildinfo"}

View File

@@ -13,12 +13,12 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/artifact" "go.maximumdirect.net/releasekit/internal/artifact"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/candidate" "go.maximumdirect.net/releasekit/internal/candidate"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gotool" "go.maximumdirect.net/releasekit/internal/gotool"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/releaseidentity" "go.maximumdirect.net/releasekit/internal/releaseidentity"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/tempdir" "go.maximumdirect.net/releasekit/internal/tempdir"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
) )
type Target = artifact.Target type Target = artifact.Target

View File

@@ -7,10 +7,10 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/candidate" "go.maximumdirect.net/releasekit/internal/candidate"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gotool" "go.maximumdirect.net/releasekit/internal/gotool"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/releaseidentity" "go.maximumdirect.net/releasekit/internal/releaseidentity"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/tempdir" "go.maximumdirect.net/releasekit/internal/tempdir"
) )
func CandidateCallback(spec *Spec, output io.Writer) func(context.Context, candidate.Candidate, *gotool.Owner) error { func CandidateCallback(spec *Spec, output io.Writer) func(context.Context, candidate.Candidate, *gotool.Owner) error {

View File

@@ -10,12 +10,12 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gotool" "go.maximumdirect.net/releasekit/internal/gotool"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/process" "go.maximumdirect.net/releasekit/internal/process"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/releaseidentity" "go.maximumdirect.net/releasekit/internal/releaseidentity"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/validation" "go.maximumdirect.net/releasekit/internal/validation"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
) )
var ErrInvalidVersion = errors.New("invalid stable version") var ErrInvalidVersion = errors.New("invalid stable version")

View File

@@ -13,8 +13,8 @@ import (
"strings" "strings"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gotool" "go.maximumdirect.net/releasekit/internal/gotool"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/validation" "go.maximumdirect.net/releasekit/internal/validation"
) )
const testVersion = "v1.2.3" const testVersion = "v1.2.3"

View File

@@ -5,9 +5,9 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/artifact" "go.maximumdirect.net/releasekit/internal/artifact"
internalbuild "gitea.maximumdirect.net/eric/ReleaseKit/internal/build" internalbuild "go.maximumdirect.net/releasekit/internal/build"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gitea" "go.maximumdirect.net/releasekit/internal/gitea"
) )
func declaredBuildAssets(result internalbuild.Result) ([]gitea.ExpectedAsset, error) { func declaredBuildAssets(result internalbuild.Result) ([]gitea.ExpectedAsset, error) {

View File

@@ -8,9 +8,9 @@ import (
"strings" "strings"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/artifact" "go.maximumdirect.net/releasekit/internal/artifact"
internalbuild "gitea.maximumdirect.net/eric/ReleaseKit/internal/build" internalbuild "go.maximumdirect.net/releasekit/internal/build"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gitea" "go.maximumdirect.net/releasekit/internal/gitea"
) )
func TestDeclaredBuildAssetsGenerateManifestFromBuildResult(t *testing.T) { func TestDeclaredBuildAssetsGenerateManifestFromBuildResult(t *testing.T) {

View File

@@ -9,14 +9,14 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
internalbuild "gitea.maximumdirect.net/eric/ReleaseKit/internal/build" internalbuild "go.maximumdirect.net/releasekit/internal/build"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/candidate" "go.maximumdirect.net/releasekit/internal/candidate"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gitea" "go.maximumdirect.net/releasekit/internal/gitea"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gotool" "go.maximumdirect.net/releasekit/internal/gotool"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/releaseidentity" "go.maximumdirect.net/releasekit/internal/releaseidentity"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/tempdir" "go.maximumdirect.net/releasekit/internal/tempdir"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
) )
type State string type State string

View File

@@ -8,9 +8,9 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/artifact" "go.maximumdirect.net/releasekit/internal/artifact"
internalbuild "gitea.maximumdirect.net/eric/ReleaseKit/internal/build" internalbuild "go.maximumdirect.net/releasekit/internal/build"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gitea" "go.maximumdirect.net/releasekit/internal/gitea"
) )
const performanceArtifactSize = 16 << 20 const performanceArtifactSize = 16 << 20

View File

@@ -12,7 +12,7 @@ import (
"strings" "strings"
"sync" "sync"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/process" "go.maximumdirect.net/releasekit/internal/process"
) )
var errBlobObjectMissing = errors.New("Git object is missing") var errBlobObjectMissing = errors.New("Git object is missing")

View File

@@ -9,7 +9,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/process" "go.maximumdirect.net/releasekit/internal/process"
) )
var ( var (

View File

@@ -10,7 +10,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/process" "go.maximumdirect.net/releasekit/internal/process"
) )
// TreeEntry records one committed path and its Git object metadata. // TreeEntry records one committed path and its Git object metadata.

View File

@@ -14,7 +14,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/artifact" "go.maximumdirect.net/releasekit/internal/artifact"
) )
const ManifestFilename = artifact.ManifestFilename const ManifestFilename = artifact.ManifestFilename

View File

@@ -12,7 +12,7 @@ import (
"strings" "strings"
"sync" "sync"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/process" "go.maximumdirect.net/releasekit/internal/process"
) )
// Mode selects the target environment for a Go command. // Mode selects the target environment for a Go command.

View File

@@ -8,10 +8,10 @@ import (
"fmt" "fmt"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/candidate" "go.maximumdirect.net/releasekit/internal/candidate"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gotool" "go.maximumdirect.net/releasekit/internal/gotool"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
) )
type TaggedCheckoutRequest struct { type TaggedCheckoutRequest struct {

View File

@@ -8,10 +8,10 @@ import (
"io" "io"
"time" "time"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/candidate" "go.maximumdirect.net/releasekit/internal/candidate"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gotool" "go.maximumdirect.net/releasekit/internal/gotool"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/validation" "go.maximumdirect.net/releasekit/internal/validation"
) )
type State string type State string

View File

@@ -10,8 +10,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/versioncontract" "go.maximumdirect.net/releasekit/internal/versioncontract"
"golang.org/x/mod/modfile" "golang.org/x/mod/modfile"
"golang.org/x/mod/module" "golang.org/x/mod/module"
) )

View File

@@ -6,7 +6,7 @@ import (
"path" "path"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
) )
const defaultFileSizeLimit int64 = 1_000_000 const defaultFileSizeLimit int64 = 1_000_000

View File

@@ -8,7 +8,7 @@ import (
"strings" "strings"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
) )
func TestCheckFileSizeUsesStrictLimitsAndDefault(t *testing.T) { func TestCheckFileSizeUsesStrictLimitsAndDefault(t *testing.T) {

View File

@@ -8,7 +8,7 @@ import (
"strings" "strings"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
) )
func TestCheckGoFormatUsesCapturedRegularGoBlobs(t *testing.T) { func TestCheckGoFormatUsesCapturedRegularGoBlobs(t *testing.T) {

View File

@@ -6,7 +6,7 @@ import (
"path" "path"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
"golang.org/x/mod/modfile" "golang.org/x/mod/modfile"
) )

View File

@@ -8,7 +8,7 @@ import (
"path" "path"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
) )
func checkMarkdownLinks(ctx context.Context, tree *CandidateTree, enforceCheckoutBoundary bool, output io.Writer) error { func checkMarkdownLinks(ctx context.Context, tree *CandidateTree, enforceCheckoutBoundary bool, output io.Writer) error {

View File

@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
) )
func BenchmarkSelectInputEntriesByModuleCount(b *testing.B) { func BenchmarkSelectInputEntriesByModuleCount(b *testing.B) {

View File

@@ -8,7 +8,7 @@ import (
"sort" "sort"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
) )
// CandidateTree is an inventory of one captured commit with blob contents // CandidateTree is an inventory of one captured commit with blob contents

View File

@@ -12,7 +12,7 @@ import (
"path" "path"
"strings" "strings"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gotool" "go.maximumdirect.net/releasekit/internal/gotool"
) )
// Settings selects shared validation behavior. // Settings selects shared validation behavior.

View File

@@ -5,7 +5,7 @@ import (
"strings" "strings"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
) )
func TestCheckWorkspaceFilesReportsCommittedBlobNames(t *testing.T) { func TestCheckWorkspaceFilesReportsCommittedBlobNames(t *testing.T) {

View File

@@ -4,4 +4,4 @@ package versioncontract
// InjectedVersionLinkerSymbol is the -X linker target used to set the runtime // InjectedVersionLinkerSymbol is the -X linker target used to set the runtime
// version. Keep it in sync with runtimeinfo.injectedVersion. // version. Keep it in sync with runtimeinfo.injectedVersion.
const InjectedVersionLinkerSymbol = "gitea.maximumdirect.net/eric/ReleaseKit/internal/runtimeinfo.injectedVersion" const InjectedVersionLinkerSymbol = "go.maximumdirect.net/releasekit/internal/runtimeinfo.injectedVersion"

View File

@@ -6,7 +6,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit" "go.maximumdirect.net/releasekit"
) )
func BenchmarkPerformanceFacadeCheck(b *testing.B) { func BenchmarkPerformanceFacadeCheck(b *testing.B) {

View File

@@ -18,8 +18,8 @@ import (
"sync" "sync"
"testing" "testing"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/gitea" "go.maximumdirect.net/releasekit/internal/gitea"
) )
const performanceDeliveryArtifactSize = 16 << 20 const performanceDeliveryArtifactSize = 16 << 20

View File

@@ -6,8 +6,8 @@ import (
"fmt" "fmt"
"strings" "strings"
internalpreparation "gitea.maximumdirect.net/eric/ReleaseKit/internal/preparation" internalpreparation "go.maximumdirect.net/releasekit/internal/preparation"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/releaseidentity" "go.maximumdirect.net/releasekit/internal/releaseidentity"
) )
// TaggedCheckoutRequest selects a full Git tag and the Git object ID expected // TaggedCheckoutRequest selects a full Git tag and the Git object ID expected

View File

@@ -9,7 +9,7 @@ import (
"strings" "strings"
"testing" "testing"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
) )
func TestPrepareTaggedCheckoutFetchesExpectedCommitAndDetaches(t *testing.T) { func TestPrepareTaggedCheckoutFetchesExpectedCommitAndDetaches(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package releasekit
import ( import (
"context" "context"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/publish" "go.maximumdirect.net/releasekit/internal/publish"
) )
type PublicationState string type PublicationState string

View File

@@ -12,8 +12,8 @@ import (
"testing" "testing"
"time" "time"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/git" "go.maximumdirect.net/releasekit/internal/git"
) )
const releaseNote = "# Sample App v1.2.3\n\nA source release.\n\nUpgrade notes stay intact.\n" const releaseNote = "# Sample App v1.2.3\n\nA source release.\n\nUpgrade notes stay intact.\n"

View File

@@ -2,9 +2,9 @@
"product": "ReleaseKit", "product": "ReleaseKit",
"remote": "origin", "remote": "origin",
"delivery": { "delivery": {
"base_url": "https://gitea.maximumdirect.net", "base_url": "https://forge.maximumdirect.net",
"owner": "eric", "owner": "base-layer",
"repository": "ReleaseKit", "repository": "releasekit",
"token_env": "RELEASEKIT_GITEA_TOKEN" "token_env": "RELEASEKIT_GITEA_TOKEN"
} }
} }

View File

@@ -7,7 +7,7 @@ import (
"strings" "strings"
"testing" "testing"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
) )
func TestModuleSelectionFollowsSymlinkBeforeParentAcrossOperations(t *testing.T) { func TestModuleSelectionFollowsSymlinkBeforeParentAcrossOperations(t *testing.T) {

View File

@@ -8,7 +8,7 @@ import (
"strings" "strings"
"testing" "testing"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
) )
func TestSourceOperationsRejectUnavailableNoteWithoutTransport(t *testing.T) { func TestSourceOperationsRejectUnavailableNoteWithoutTransport(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"errors" "errors"
"slices" "slices"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/validation" "go.maximumdirect.net/releasekit/internal/validation"
) )
// ValidationCheck identifies a shared validation check that failed. // ValidationCheck identifies a shared validation check that failed.

View File

@@ -6,7 +6,7 @@ import (
"strings" "strings"
"testing" "testing"
releasekit "gitea.maximumdirect.net/eric/ReleaseKit" releasekit "go.maximumdirect.net/releasekit"
) )
func TestValidationErrorPresentsFindingsAlongsideCause(t *testing.T) { func TestValidationErrorPresentsFindingsAlongsideCause(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"strings" "strings"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/validation" "go.maximumdirect.net/releasekit/internal/validation"
) )
func TestSharedFileFailureKeepsPublicIdentityPathAndCause(t *testing.T) { func TestSharedFileFailureKeepsPublicIdentityPathAndCause(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"errors" "errors"
"testing" "testing"
"gitea.maximumdirect.net/eric/ReleaseKit/internal/validation" "go.maximumdirect.net/releasekit/internal/validation"
) )
func TestCandidateRequestMapsGoValidation(t *testing.T) { func TestCandidateRequestMapsGoValidation(t *testing.T) {