1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-11-06 09:09:29 +02:00

fix: Modified brew formula class generation to remove dots to match what homebrew expects (#3117)

Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Corbin Phelps
2022-05-20 09:25:35 -04:00
committed by GitHub
parent cc27fba627
commit 8dde97c597
2 changed files with 2 additions and 2 deletions

View File

@@ -408,7 +408,7 @@ func split(s string) []string {
func formulaNameFor(name string) string {
name = strings.ReplaceAll(name, "-", " ")
name = strings.ReplaceAll(name, "_", " ")
name = strings.ReplaceAll(name, ".", "_")
name = strings.ReplaceAll(name, ".", "")
name = strings.ReplaceAll(name, "@", "AT")
return strings.ReplaceAll(strings.Title(name), " ", "") // nolint:staticcheck
}

View File

@@ -28,7 +28,7 @@ func TestNameWithUnderline(t *testing.T) {
}
func TestNameWithDots(t *testing.T) {
require.Equal(t, formulaNameFor("binaryv0.0.0"), "Binaryv0_0_0")
require.Equal(t, formulaNameFor("binaryv0.0.0"), "Binaryv000")
}
func TestNameWithAT(t *testing.T) {