mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-01 13:07:49 +02:00
fix: Brew versioned formulae now supported (#1568)
This commit is contained in:
parent
5f41640978
commit
6645c58114
@ -309,5 +309,6 @@ func split(s string) []string {
|
||||
func formulaNameFor(name string) string {
|
||||
name = strings.Replace(name, "-", " ", -1)
|
||||
name = strings.Replace(name, "_", " ", -1)
|
||||
name = strings.Replace(name, "@", "AT", -1)
|
||||
return strings.Replace(strings.Title(name), " ", "", -1)
|
||||
}
|
||||
|
@ -29,6 +29,10 @@ func TestNameWithUnderline(t *testing.T) {
|
||||
assert.Equal(t, formulaNameFor("some_binary"), "SomeBinary")
|
||||
}
|
||||
|
||||
func TestNameWithAT(t *testing.T) {
|
||||
assert.Equal(t, formulaNameFor("some_binary@1"), "SomeBinaryAT1")
|
||||
}
|
||||
|
||||
func TestSimpleName(t *testing.T) {
|
||||
assert.Equal(t, formulaNameFor("binary"), "Binary")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user