1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00

fix: brew style (#3274)

* fix: brew style

closes #3236

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: more fixes

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: more fixes

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2022-08-06 19:00:16 -03:00 committed by GitHub
parent 5a433347ac
commit d6306059d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 230 additions and 185 deletions

View File

@ -75,7 +75,7 @@ var defaultTemplateData = templateData{
}, },
{ {
DownloadURL: "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_arm64.tar.gz", DownloadURL: "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_arm64.tar.gz",
SHA256: "1633f61598ab0791e213135923624eb342196b349490sadasdsadsadasdasdsd", SHA256: "1df5fdc2bad4ed4c28fbdc77b6c542988c0dc0e2ae34e0dc912bbb1c66646c58",
OS: "darwin", OS: "darwin",
Arch: "arm64", Arch: "arm64",
Install: []string{`bin.install "test"`}, Install: []string{`bin.install "test"`},
@ -103,9 +103,9 @@ func TestFullFormulae(t *testing.T) {
data.Dependencies = []config.HomebrewDependency{{Name: "gtk+"}} data.Dependencies = []config.HomebrewDependency{{Name: "gtk+"}}
data.Conflicts = []string{"svn"} data.Conflicts = []string{"svn"}
data.Plist = "it works" data.Plist = "it works"
data.PostInstall = []string{`system "touch", "/tmp/foo"`, `system "echo", "done"`} data.PostInstall = []string{`touch "/tmp/foo"`, `system "echo", "done"`}
data.CustomBlock = []string{"devel do", ` url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz"`, ` sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c68"`, "end"} data.CustomBlock = []string{"devel do", ` url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz"`, ` sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c68"`, "end"}
data.Tests = []string{`system "#{bin}/{{.ProjectName}} -version"`} data.Tests = []string{`system "#{bin}/{{.ProjectName}}", "-version"`}
formulae, err := doBuildFormula(context.New(config.Project{ formulae, err := doBuildFormula(context.New(config.Project{
ProjectName: "foo", ProjectName: "foo",
}), data) }), data)
@ -145,8 +145,8 @@ func TestFormulaeSimple(t *testing.T) {
} }
func TestSplit(t *testing.T) { func TestSplit(t *testing.T) {
parts := split("system \"true\"\nsystem \"#{bin}/foo -h\"") parts := split("system \"true\"\nsystem \"#{bin}/foo\", \"-h\"")
require.Equal(t, []string{"system \"true\"", "system \"#{bin}/foo -h\""}, parts) require.Equal(t, []string{"system \"true\"", "system \"#{bin}/foo\", \"-h\""}, parts)
parts = split("") parts = split("")
require.Equal(t, []string{}, parts) require.Equal(t, []string{}, parts)
parts = split("\n ") parts = split("\n ")
@ -268,14 +268,14 @@ func TestFullPipe(t *testing.T) {
IDs: []string{ IDs: []string{
"foo", "foo",
}, },
Description: "A run pipe test formula and FOO={{ .Env.FOO }}", Description: "Run pipe test formula and FOO={{ .Env.FOO }}",
Caveats: "don't do this {{ .ProjectName }}", Caveats: "don't do this {{ .ProjectName }}",
Test: "system \"true\"\nsystem \"#{bin}/foo -h\"", Test: "system \"true\"\nsystem \"#{bin}/foo\", \"-h\"",
Plist: `<xml>whatever</xml>`, Plist: `<xml>whatever</xml>`,
Dependencies: []config.HomebrewDependency{{Name: "zsh", Type: "optional"}, {Name: "bash"}}, Dependencies: []config.HomebrewDependency{{Name: "zsh", Type: "optional"}, {Name: "bash"}},
Conflicts: []string{"gtk+", "qt"}, Conflicts: []string{"gtk+", "qt"},
Service: "run foo/bar\nkeep_alive true", Service: "run foo/bar\nkeep_alive true",
PostInstall: "system \"echo\"\nsystem \"touch\" \"/tmp/hi\"", PostInstall: "system \"echo\"\ntouch \"/tmp/hi\"",
Install: `bin.install "{{ .ProjectName }}"`, Install: `bin.install "{{ .ProjectName }}"`,
Goamd64: "v1", Goamd64: "v1",
}, },
@ -353,8 +353,11 @@ func TestRunPipeNameTemplate(t *testing.T) {
ProjectName: "foo", ProjectName: "foo",
Brews: []config.Homebrew{ Brews: []config.Homebrew{
{ {
Name: "foo_{{ .Env.FOO_BAR }}", Name: "foo_{{ .Env.FOO_BAR }}",
Goamd64: "v1", Description: "Foo bar",
Homepage: "https://goreleaser.com",
Goamd64: "v1",
Install: `bin.install "foo"`,
Tap: config.RepoRef{ Tap: config.RepoRef{
Owner: "foo", Owner: "foo",
Name: "bar", Name: "bar",
@ -524,12 +527,13 @@ func TestRunPipeForMultipleAmd64Versions(t *testing.T) {
Brews: []config.Homebrew{ Brews: []config.Homebrew{
{ {
Name: name, Name: name,
Description: "A run pipe test formula", Description: "Run pipe test formula",
Tap: config.RepoRef{ Tap: config.RepoRef{
Owner: "test", Owner: "test",
Name: "test", Name: "test",
}, },
Homepage: "https://github.com/goreleaser", Homepage: "https://github.com/goreleaser",
Install: `bin.install "foo"`,
}, },
}, },
GitHubURLs: config.GitHubURLs{ GitHubURLs: config.GitHubURLs{
@ -648,9 +652,9 @@ func TestRunPipeForMultipleArmVersions(t *testing.T) {
Brews: []config.Homebrew{ Brews: []config.Homebrew{
{ {
Name: name, Name: name,
Description: "A run pipe test formula and FOO={{ .Env.FOO }}", Description: "Run pipe test formula and FOO={{ .Env.FOO }}",
Caveats: "don't do this {{ .ProjectName }}", Caveats: "don't do this {{ .ProjectName }}",
Test: "system \"true\"\nsystem \"#{bin}/foo -h\"", Test: "system \"true\"\nsystem \"#{bin}/foo\", \"-h\"",
Plist: `<xml>whatever</xml>`, Plist: `<xml>whatever</xml>`,
Dependencies: []config.HomebrewDependency{{Name: "zsh"}, {Name: "bash", Type: "recommended"}}, Dependencies: []config.HomebrewDependency{{Name: "zsh"}, {Name: "bash", Type: "recommended"}},
Conflicts: []string{"gtk+", "qt"}, Conflicts: []string{"gtk+", "qt"},
@ -921,7 +925,9 @@ func TestRunPipeBinaryRelease(t *testing.T) {
ProjectName: "foo", ProjectName: "foo",
Brews: []config.Homebrew{ Brews: []config.Homebrew{
{ {
Name: "foo", Name: "foo",
Homepage: "https://goreleaser.com",
Description: "Fake desc",
Tap: config.RepoRef{ Tap: config.RepoRef{
Owner: "foo", Owner: "foo",
Name: "bar", Name: "bar",
@ -1159,7 +1165,9 @@ func TestRunPipeUniversalBinary(t *testing.T) {
ProjectName: "unibin", ProjectName: "unibin",
Brews: []config.Homebrew{ Brews: []config.Homebrew{
{ {
Name: "unibin", Name: "unibin",
Homepage: "https://goreleaser.com",
Description: "Fake desc",
Tap: config.RepoRef{ Tap: config.RepoRef{
Owner: "unibin", Owner: "unibin",
Name: "bar", Name: "bar",
@ -1215,7 +1223,9 @@ func TestRunPipeUniversalBinaryNotReplacing(t *testing.T) {
ProjectName: "unibin", ProjectName: "unibin",
Brews: []config.Homebrew{ Brews: []config.Homebrew{
{ {
Name: "unibin", Name: "unibin",
Homepage: "https://goreleaser.com",
Description: "Fake desc",
Tap: config.RepoRef{ Tap: config.RepoRef{
Owner: "unibin", Owner: "unibin",
Name: "bar", Name: "bar",

View File

@ -45,6 +45,13 @@ class {{ .Name }} < Formula
{{- if .License }} {{- if .License }}
license "{{ .License }}" license "{{ .License }}"
{{- end }} {{- end }}
{{- with .Dependencies }}
{{ range $index, $element := . }}
depends_on "{{ .Name }}"
{{- if .Type }} => :{{ .Type }}{{- end }}
{{- end }}
{{- end -}}
{{- if and (not .LinuxPackages) .MacOSPackages }} {{- if and (not .LinuxPackages) .MacOSPackages }}
depends_on :macos depends_on :macos
{{- end }} {{- end }}
@ -58,7 +65,7 @@ class {{ .Name }} < Formula
{{- range $element := .MacOSPackages }} {{- range $element := .MacOSPackages }}
{{- if eq $element.Arch "all" }} {{- if eq $element.Arch "all" }}
url "{{ $element.DownloadURL }}" url "{{ $element.DownloadURL }}"
{{- if .DownloadStrategy }}, :using => {{ .DownloadStrategy }}{{- end }} {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }}
sha256 "{{ $element.SHA256 }}" sha256 "{{ $element.SHA256 }}"
def install def install
@ -68,7 +75,7 @@ class {{ .Name }} < Formula
end end
{{- else if $.HasOnlyAmd64MacOsPkg }} {{- else if $.HasOnlyAmd64MacOsPkg }}
url "{{ $element.DownloadURL }}" url "{{ $element.DownloadURL }}"
{{- if .DownloadStrategy }}, :using => {{ .DownloadStrategy }}{{- end }} {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }}
sha256 "{{ $element.SHA256 }}" sha256 "{{ $element.SHA256 }}"
def install def install
@ -94,7 +101,7 @@ class {{ .Name }} < Formula
if Hardware::CPU.arm? if Hardware::CPU.arm?
{{- end}} {{- end}}
url "{{ $element.DownloadURL }}" url "{{ $element.DownloadURL }}"
{{- if .DownloadStrategy }}, :using => {{ .DownloadStrategy }}{{- end }} {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }}
sha256 "{{ $element.SHA256 }}" sha256 "{{ $element.SHA256 }}"
def install def install
@ -123,7 +130,7 @@ class {{ .Name }} < Formula
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
{{- end }} {{- end }}
url "{{ $element.DownloadURL }}" url "{{ $element.DownloadURL }}"
{{- if .DownloadStrategy }}, :using => {{ .DownloadStrategy }}{{- end }} {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }}
sha256 "{{ $element.SHA256 }}" sha256 "{{ $element.SHA256 }}"
def install def install
@ -136,25 +143,18 @@ class {{ .Name }} < Formula
end end
{{- end }} {{- end }}
{{- with .CustomBlock }}
{{ range $index, $element := . }}
{{ . }}
{{- end }}
{{- end }}
{{- with .Dependencies }}
{{ range $index, $element := . }}
depends_on "{{ .Name }}"
{{- if .Type }} => :{{ .Type }}{{- end }}
{{- end }}
{{- end -}}
{{- with .Conflicts }} {{- with .Conflicts }}
{{ range $index, $element := . }} {{ range $index, $element := . }}
conflicts_with "{{ . }}" conflicts_with "{{ . }}"
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with .CustomBlock }}
{{ range $index, $element := . }}
{{ . }}
{{- end }}
{{- end }}
{{- with .PostInstall }} {{- with .PostInstall }}
def post_install def post_install
@ -166,21 +166,23 @@ class {{ .Name }} < Formula
{{- with .Caveats }} {{- with .Caveats }}
def caveats; <<~EOS def caveats
<<~EOS
{{- range $index, $element := . }} {{- range $index, $element := . }}
{{ . -}} {{ . -}}
{{- end }} {{- end }}
EOS EOS
end end
{{- end -}} {{- end -}}
{{- with .Plist }} {{- with .Plist }}
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
{{ . }} <<~EOS
EOS {{ . }}
EOS
end end
{{- end -}} {{- end -}}

View File

@ -8,6 +8,8 @@ class Test < Formula
version "0.1.3" version "0.1.3"
license "MIT" license "MIT"
depends_on "gtk+"
on_macos do on_macos do
if Hardware::CPU.intel? if Hardware::CPU.intel?
url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz" url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz"
@ -19,7 +21,7 @@ class Test < Formula
end end
if Hardware::CPU.arm? if Hardware::CPU.arm?
url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_arm64.tar.gz" url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_arm64.tar.gz"
sha256 "1633f61598ab0791e213135923624eb342196b349490sadasdsadsadasdasdsd" sha256 "1df5fdc2bad4ed4c28fbdc77b6c542988c0dc0e2ae34e0dc912bbb1c66646c58"
def install def install
bin.install "test" bin.install "test"
@ -54,33 +56,33 @@ class Test < Formula
end end
end end
conflicts_with "svn"
devel do devel do
url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz" url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz"
sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c68" sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c68"
end end
depends_on "gtk+"
conflicts_with "svn"
def post_install def post_install
system "touch", "/tmp/foo" touch "/tmp/foo"
system "echo", "done" system "echo", "done"
end end
def caveats; <<~EOS def caveats
Here are some caveats <<~EOS
EOS Here are some caveats
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
it works <<~EOS
EOS it works
EOS
end end
test do test do
system "#{bin}/foo -version" system "#{bin}/foo", "-version"
end end
end end

View File

@ -19,7 +19,7 @@ class Test < Formula
end end
if Hardware::CPU.arm? if Hardware::CPU.arm?
url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_arm64.tar.gz" url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_arm64.tar.gz"
sha256 "1633f61598ab0791e213135923624eb342196b349490sadasdsadsadasdasdsd" sha256 "1df5fdc2bad4ed4c28fbdc77b6c542988c0dc0e2ae34e0dc912bbb1c66646c58"
def install def install
bin.install "test" bin.install "test"

View File

@ -3,9 +3,12 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class CustomBlock < Formula class CustomBlock < Formula
desc "A run pipe test formula and FOO=foo_is_bar" desc "Run pipe test formula and FOO=foo_is_bar"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
depends_on "zsh" => :optional
depends_on "bash"
depends_on :macos depends_on :macos
on_macos do on_macos do
@ -27,29 +30,28 @@ class CustomBlock < Formula
end end
end end
head "https://github.com/caarlos0/test.git"
depends_on "zsh" => :optional
depends_on "bash"
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
head "https://github.com/caarlos0/test.git"
def post_install def post_install
system "echo" system "echo"
system "touch" "/tmp/hi" touch "/tmp/hi"
end end
def caveats; <<~EOS def caveats
don't do this custom_block <<~EOS
EOS don't do this custom_block
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
service do service do
@ -59,6 +61,6 @@ class CustomBlock < Formula
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -3,13 +3,16 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class CustomDownloadStrategy < Formula class CustomDownloadStrategy < Formula
desc "A run pipe test formula and FOO=foo_is_bar" desc "Run pipe test formula and FOO=foo_is_bar"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
depends_on "zsh" => :optional
depends_on "bash"
depends_on :macos depends_on :macos
on_macos do on_macos do
url "https://dummyhost/download/v1.0.1/bin.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy url "https://dummyhost/download/v1.0.1/bin.tar.gz", using: GitHubPrivateRepositoryReleaseDownloadStrategy
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
@ -27,27 +30,26 @@ class CustomDownloadStrategy < Formula
end end
end end
depends_on "zsh" => :optional
depends_on "bash"
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
def post_install def post_install
system "echo" system "echo"
system "touch" "/tmp/hi" touch "/tmp/hi"
end end
def caveats; <<~EOS def caveats
don't do this custom_download_strategy <<~EOS
EOS don't do this custom_download_strategy
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
service do service do
@ -57,6 +59,6 @@ class CustomDownloadStrategy < Formula
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -4,13 +4,16 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
require_relative "custom_download_strategy" require_relative "custom_download_strategy"
class CustomRequire < Formula class CustomRequire < Formula
desc "A run pipe test formula and FOO=foo_is_bar" desc "Run pipe test formula and FOO=foo_is_bar"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
depends_on "zsh" => :optional
depends_on "bash"
depends_on :macos depends_on :macos
on_macos do on_macos do
url "https://dummyhost/download/v1.0.1/bin.tar.gz", :using => CustomDownloadStrategy url "https://dummyhost/download/v1.0.1/bin.tar.gz", using: CustomDownloadStrategy
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
@ -28,27 +31,26 @@ class CustomRequire < Formula
end end
end end
depends_on "zsh" => :optional
depends_on "bash"
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
def post_install def post_install
system "echo" system "echo"
system "touch" "/tmp/hi" touch "/tmp/hi"
end end
def caveats; <<~EOS def caveats
don't do this custom_require <<~EOS
EOS don't do this custom_require
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
service do service do
@ -58,6 +60,6 @@ class CustomRequire < Formula
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -3,9 +3,12 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class Default < Formula class Default < Formula
desc "A run pipe test formula and FOO=foo_is_bar" desc "Run pipe test formula and FOO=foo_is_bar"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
depends_on "zsh" => :optional
depends_on "bash"
depends_on :macos depends_on :macos
on_macos do on_macos do
@ -27,27 +30,26 @@ class Default < Formula
end end
end end
depends_on "zsh" => :optional
depends_on "bash"
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
def post_install def post_install
system "echo" system "echo"
system "touch" "/tmp/hi" touch "/tmp/hi"
end end
def caveats; <<~EOS def caveats
don't do this default <<~EOS
EOS don't do this default
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
service do service do
@ -57,6 +59,6 @@ class Default < Formula
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -3,9 +3,12 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class DefaultGitlab < Formula class DefaultGitlab < Formula
desc "A run pipe test formula and FOO=foo_is_bar" desc "Run pipe test formula and FOO=foo_is_bar"
homepage "https://gitlab.com/goreleaser" homepage "https://gitlab.com/goreleaser"
version "1.0.1" version "1.0.1"
depends_on "zsh" => :optional
depends_on "bash"
depends_on :macos depends_on :macos
on_macos do on_macos do
@ -27,27 +30,26 @@ class DefaultGitlab < Formula
end end
end end
depends_on "zsh" => :optional
depends_on "bash"
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
def post_install def post_install
system "echo" system "echo"
system "touch" "/tmp/hi" touch "/tmp/hi"
end end
def caveats; <<~EOS def caveats
don't do this default_gitlab <<~EOS
EOS don't do this default_gitlab
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
service do service do
@ -57,6 +59,6 @@ class DefaultGitlab < Formula
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -3,9 +3,12 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class ValidTapTemplates < Formula class ValidTapTemplates < Formula
desc "A run pipe test formula and FOO=templated" desc "Run pipe test formula and FOO=templated"
homepage "" homepage ""
version "1.0.1" version "1.0.1"
depends_on "zsh" => :optional
depends_on "bash"
depends_on :macos depends_on :macos
on_macos do on_macos do
@ -27,27 +30,26 @@ class ValidTapTemplates < Formula
end end
end end
depends_on "zsh" => :optional
depends_on "bash"
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
def post_install def post_install
system "echo" system "echo"
system "touch" "/tmp/hi" touch "/tmp/hi"
end end
def caveats; <<~EOS def caveats
don't do this valid_tap_templates <<~EOS
EOS don't do this valid_tap_templates
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
service do service do
@ -57,6 +59,6 @@ class ValidTapTemplates < Formula
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -3,8 +3,8 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class Foo < Formula class Foo < Formula
desc "" desc "Fake desc"
homepage "" homepage "https://goreleaser.com"
version "1.2.1" version "1.2.1"
depends_on :macos depends_on :macos

View File

@ -3,7 +3,7 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class V1 < Formula class V1 < Formula
desc "A run pipe test formula" desc "Run pipe test formula"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
@ -13,6 +13,7 @@ class V1 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
end end
@ -23,6 +24,7 @@ class V1 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
if Hardware::CPU.intel? if Hardware::CPU.intel?
@ -30,6 +32,7 @@ class V1 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
end end

View File

@ -3,7 +3,7 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class V2 < Formula class V2 < Formula
desc "A run pipe test formula" desc "Run pipe test formula"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
@ -13,6 +13,7 @@ class V2 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
end end
@ -23,6 +24,7 @@ class V2 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
if Hardware::CPU.intel? if Hardware::CPU.intel?
@ -30,6 +32,7 @@ class V2 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
end end

View File

@ -3,7 +3,7 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class V3 < Formula class V3 < Formula
desc "A run pipe test formula" desc "Run pipe test formula"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
@ -13,6 +13,7 @@ class V3 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
end end
@ -23,6 +24,7 @@ class V3 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
if Hardware::CPU.intel? if Hardware::CPU.intel?
@ -30,6 +32,7 @@ class V3 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
end end

View File

@ -3,7 +3,7 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class V4 < Formula class V4 < Formula
desc "A run pipe test formula" desc "Run pipe test formula"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
@ -13,6 +13,7 @@ class V4 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
end end
@ -23,6 +24,7 @@ class V4 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
if Hardware::CPU.intel? if Hardware::CPU.intel?
@ -30,6 +32,7 @@ class V4 < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
end end
end end

View File

@ -3,10 +3,13 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class MultipleArmv5 < Formula class MultipleArmv5 < Formula
desc "A run pipe test formula and FOO=foo_is_bar" desc "Run pipe test formula and FOO=foo_is_bar"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
depends_on "zsh"
depends_on "bash" => :recommended
on_macos do on_macos do
url "https://dummyhost/download/v1.0.1/bin.tar.gz" url "https://dummyhost/download/v1.0.1/bin.tar.gz"
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
@ -45,26 +48,25 @@ class MultipleArmv5 < Formula
end end
end end
depends_on "zsh"
depends_on "bash" => :recommended
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
def caveats; <<~EOS def caveats
don't do this multiple_armv5 <<~EOS
EOS don't do this multiple_armv5
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -3,10 +3,13 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class MultipleArmv6 < Formula class MultipleArmv6 < Formula
desc "A run pipe test formula and FOO=foo_is_bar" desc "Run pipe test formula and FOO=foo_is_bar"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
depends_on "zsh"
depends_on "bash" => :recommended
on_macos do on_macos do
url "https://dummyhost/download/v1.0.1/bin.tar.gz" url "https://dummyhost/download/v1.0.1/bin.tar.gz"
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
@ -45,26 +48,25 @@ class MultipleArmv6 < Formula
end end
end end
depends_on "zsh"
depends_on "bash" => :recommended
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
def caveats; <<~EOS def caveats
don't do this multiple_armv6 <<~EOS
EOS don't do this multiple_armv6
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -3,10 +3,13 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class MultipleArmv7 < Formula class MultipleArmv7 < Formula
desc "A run pipe test formula and FOO=foo_is_bar" desc "Run pipe test formula and FOO=foo_is_bar"
homepage "https://github.com/goreleaser" homepage "https://github.com/goreleaser"
version "1.0.1" version "1.0.1"
depends_on "zsh"
depends_on "bash" => :recommended
on_macos do on_macos do
url "https://dummyhost/download/v1.0.1/bin.tar.gz" url "https://dummyhost/download/v1.0.1/bin.tar.gz"
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
@ -45,26 +48,25 @@ class MultipleArmv7 < Formula
end end
end end
depends_on "zsh"
depends_on "bash" => :recommended
conflicts_with "gtk+" conflicts_with "gtk+"
conflicts_with "qt" conflicts_with "qt"
def caveats; <<~EOS def caveats
don't do this multiple_armv7 <<~EOS
EOS don't do this multiple_armv7
EOS
end end
plist_options :startup => false plist_options startup: false
def plist; <<~EOS def plist
<xml>whatever</xml> <<~EOS
EOS <xml>whatever</xml>
EOS
end end
test do test do
system "true" system "true"
system "#{bin}/foo -h" system "#{bin}/foo", "-h"
end end
end end

View File

@ -3,8 +3,8 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class FooIsBar < Formula class FooIsBar < Formula
desc "" desc "Foo bar"
homepage "" homepage "https://goreleaser.com"
version "1.0.1" version "1.0.1"
depends_on :macos depends_on :macos
@ -13,6 +13,7 @@ class FooIsBar < Formula
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
def install def install
bin.install "foo"
end end
if Hardware::CPU.arm? if Hardware::CPU.arm?

View File

@ -3,8 +3,8 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class Unibin < Formula class Unibin < Formula
desc "" desc "Fake desc"
homepage "" homepage "https://goreleaser.com"
version "1.0.1" version "1.0.1"
depends_on :macos depends_on :macos

View File

@ -3,8 +3,8 @@
# This file was generated by GoReleaser. DO NOT EDIT. # This file was generated by GoReleaser. DO NOT EDIT.
class Unibin < Formula class Unibin < Formula
desc "" desc "Fake desc"
homepage "" homepage "https://goreleaser.com"
version "1.0.1" version "1.0.1"
depends_on :macos depends_on :macos