You've already forked goreleaser
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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user