3 Commits

Author SHA1 Message Date
Micheal Wilkinson
9da7a251b2 refactor(changelog): update unreleased since v1.0.0
All checks were successful
Push Validation / validate (push) Successful in 54s
2026-03-20 18:52:34 +00:00
Micheal Wilkinson
971a7744bf fix(releaseprep): green unchanged-version prepare 2026-03-20 18:52:34 +00:00
Micheal Wilkinson
d1d5673460 test(releaseprep): red for unchanged-version prepare 2026-03-20 18:52:33 +00:00
3 changed files with 34 additions and 1 deletions

View File

@@ -9,6 +9,23 @@ A `### Breaking` section is used in addition to Keep a Changelog's standard sect
## [Unreleased] ## [Unreleased]
### Breaking
### Added
- Reusable `workflow_call` support for the `Prepare Release` workflow, enabling other repositories to invoke it directly.
- Automated release artifact publishing in the release workflow for `darwin`, `linux`, and `windows` binaries plus `checksums.txt`.
- README guidance for release artifacts and examples for reusing vociferate as a composite action or reusable workflow.
### Changed
- Release creation is now idempotent: existing releases for the same tag are updated in place instead of recreated.
- Release asset uploads now replace existing assets with matching filenames so reruns stay synchronized.
### Fixed
### Removed
## [1.0.0] - 2026-03-20 ## [1.0.0] - 2026-03-20
### Breaking ### Breaking

View File

@@ -161,7 +161,7 @@ func updateVersionFile(rootDir, version string, options resolvedOptions) error {
replacement := strings.Replace(match[0], match[1], version, 1) replacement := strings.Replace(match[0], match[1], version, 1)
updated := strings.Replace(string(contents), match[0], replacement, 1) updated := strings.Replace(string(contents), match[0], replacement, 1)
if updated == string(contents) { if updated == string(contents) {
return fmt.Errorf("version value not found in %s", path) return nil
} }
if err := os.WriteFile(path, []byte(updated), 0o644); err != nil { if err := os.WriteFile(path, []byte(updated), 0o644); err != nil {

View File

@@ -142,6 +142,22 @@ func (s *PrepareSuite) TestPrepare_UsesCustomVersionFileAndPattern() {
require.Equal(s.T(), "VERSION=1.1.8\n", string(versionBytes)) require.Equal(s.T(), "VERSION=1.1.8\n", string(versionBytes))
} }
func (s *PrepareSuite) TestPrepare_AllowsUnchangedVersionValue() {
require.NoError(s.T(), os.WriteFile(
filepath.Join(s.rootDir, "internal", "releaseprep", "version", "version.go"),
[]byte("package version\n\nconst String = \"1.1.6\"\n"),
0o644,
))
err := releaseprep.Prepare(s.rootDir, "1.1.6", "2026-03-20", releaseprep.Options{})
require.NoError(s.T(), err)
versionBytes, readErr := os.ReadFile(filepath.Join(s.rootDir, "internal", "releaseprep", "version", "version.go"))
require.NoError(s.T(), readErr)
require.Equal(s.T(), "package version\n\nconst String = \"1.1.6\"\n", string(versionBytes))
}
func (s *PrepareSuite) TestRecommendedTag_UsesCustomVersionFileAndPattern() { func (s *PrepareSuite) TestRecommendedTag_UsesCustomVersionFileAndPattern() {
customVersionFile := filepath.Join("custom", "VERSION.txt") customVersionFile := filepath.Join("custom", "VERSION.txt")
require.NoError(s.T(), os.MkdirAll(filepath.Join(s.rootDir, "custom"), 0o755)) require.NoError(s.T(), os.MkdirAll(filepath.Join(s.rootDir, "custom"), 0o755))