Compare commits
3 Commits
8fadb8299c
...
9da7a251b2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9da7a251b2 | ||
|
|
971a7744bf | ||
|
|
d1d5673460 |
17
changelog.md
17
changelog.md
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user