diff --git a/CHANGELOG.md b/CHANGELOG.md index 6020103..9716d70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to `ichava/icon-sets-sync` (formerly `ichava/maintainer-tool ## [Unreleased] +### Changed + +- **The next release is v0.1.3, and v0.1.0 to v0.1.2 are retracted.** Those three versions were published from history rewritten on 2026-11-13, so the Go proxy and `sum.golang.org` still serve code that git no longer holds, and a tag is never reused. `release-please-config.json` sets `release-as` to 0.1.3, `src/go.mod` retracts `[v0.1.0, v0.1.2]`, and `TestNextReleaseSkipsTheBurnedVersions` keeps both in place. + ## [0.1.0] - 2026-11-13 First release of `ichava/icon-sets-sync` as a single published commit. The 0.1.x tags cut between 2026-10-23 and 2026-10-26 (v0.1.0 to v0.1.2, with their `src/` module aliases) are folded into this release, and their notes are kept below under *Archived history*. diff --git a/release-please-config.json b/release-please-config.json index b748cd0..5959b4c 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -8,7 +8,8 @@ "skip-changelog": true, "packages": { ".": { - "package-name": "ichava/icon-sets-sync" + "package-name": "ichava/icon-sets-sync", + "release-as": "0.1.3" } } } diff --git a/src/go.mod b/src/go.mod index 1b35f4a..54ef818 100644 --- a/src/go.mod +++ b/src/go.mod @@ -12,6 +12,11 @@ module github.com/ichava/icon-sets-sync/src go 1.26.0 +// v0.1.0 to v0.1.2 were published from history rewritten on 2026-11-13, so the +// Go proxy and sum.golang.org serve code that git no longer holds. The next +// release is v0.1.3 (release-as in release-please-config.json). +retract [v0.1.0, v0.1.2] // published from history rewritten on 2026-11-13 + require ( github.com/charmbracelet/bubbles v1.0.0 github.com/charmbracelet/bubbletea v1.3.10 diff --git a/src/internal/cli/release_version_test.go b/src/internal/cli/release_version_test.go new file mode 100644 index 0000000..5dc1fec --- /dev/null +++ b/src/internal/cli/release_version_test.go @@ -0,0 +1,50 @@ +package cli + +import ( + "encoding/json" + "os" + "path/filepath" + "strings" + "testing" +) + +// v0.1.0 to v0.1.2 were published from history rewritten on 2026-11-13. The +// Go proxy and sum.golang.org cache them for good, so the next release must be +// above v0.1.2 and those three must stay retracted. +func TestNextReleaseSkipsTheBurnedVersions(t *testing.T) { + raw, err := os.ReadFile(filepath.Join(filepath.FromSlash(repoRoot), "release-please-config.json")) + if err != nil { + t.Fatal(err) + } + var cfg struct { + Packages map[string]struct { + ReleaseAs string `json:"release-as"` + } `json:"packages"` + } + if err := json.Unmarshal(raw, &cfg); err != nil { + t.Fatal(err) + } + if got := cfg.Packages["."].ReleaseAs; got != "0.1.3" { + t.Errorf(`release-please-config.json packages["."].release-as = %q, want "0.1.3"`, got) + } + + mod, err := os.ReadFile(filepath.Join(filepath.FromSlash(repoRoot), "src", "go.mod")) + if err != nil { + t.Fatal(err) + } + var retracts []string + for _, line := range strings.Split(string(mod), "\n") { + if strings.HasPrefix(line, "retract ") { + retracts = append(retracts, line) + } + } + var found bool + for _, line := range retracts { + if strings.HasPrefix(line, "retract [v0.1.0, v0.1.2] //") && strings.Contains(line, "rewritten") { + found = true + } + } + if !found { + t.Errorf("src/go.mod must retract [v0.1.0, v0.1.2] with a comment naming the rewritten history; found %d retract lines: %q", len(retracts), retracts) + } +}