1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-09 13:36:56 +02:00

fix: generate valid brew formula (#1048)

closes #1047
This commit is contained in:
Grachev Mikhail 2019-06-11 15:23:43 +03:00 committed by Carlos Alexandro Becker
parent 1ef9906e04
commit 3f082c9252
3 changed files with 6 additions and 6 deletions

View File

@ -35,17 +35,17 @@ class {{ .Name }} < Formula
if OS.mac?
{{- if .MacOS.DownloadURL }}
url "{{ .MacOS.DownloadURL }}"
{{- if .DownloadStrategy }}, :using => {{ .DownloadStrategy }}{{- end }}
sha256 "{{ .MacOS.SHA256 }}"
{{- end }}
elsif OS.linux?
{{- if .Linux.DownloadURL }}
url "{{ .Linux.DownloadURL }}"
{{- if .DownloadStrategy }}, :using => {{ .DownloadStrategy }}{{- end }}
sha256 "{{ .Linux.SHA256 }}"
{{- end }}
end
{{- if .DownloadStrategy }}, :using => {{ .DownloadStrategy }}{{- end }}
{{- with .CustomBlock }}
{{ range $index, $element := . }}
{{ . }}

View File

@ -5,10 +5,10 @@ class CustomDownloadStrategy < Formula
version "1.0.1"
if OS.mac?
url "https://github.com/test/test/releases/download/v1.0.1/bin.tar.gz"
url "https://github.com/test/test/releases/download/v1.0.1/bin.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
elsif OS.linux?
end, :using => GitHubPrivateRepositoryReleaseDownloadStrategy
end
depends_on "zsh"
depends_on "bash"

View File

@ -6,10 +6,10 @@ class CustomRequire < Formula
version "1.0.1"
if OS.mac?
url "https://github.com/test/test/releases/download/v1.0.1/bin.tar.gz"
url "https://github.com/test/test/releases/download/v1.0.1/bin.tar.gz", :using => CustomDownloadStrategy
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
elsif OS.linux?
end, :using => CustomDownloadStrategy
end
depends_on "zsh"
depends_on "bash"