1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-13 01:30:50 +02:00

simplify brew formulae

This commit is contained in:
Carlos Alexandro Becker
2017-01-06 13:54:14 -02:00
parent e45e47b953
commit 9f7ff008e9
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ import (
const formulae = `class {{ .Name }} < Formula
desc "{{ .Desc }}"
homepage "{{ .Homepage }}"
url "https://github.com/{{ .Repo }}/releases/download/{{ .Tag }}/{{ .BinaryName }}_#{%x(uname -s).gsub(/\n/, '')}_#{%x(uname -m).gsub(/\n/, '')}.tar.gz"
url "https://github.com/{{ .Repo }}/releases/download/{{ .Tag }}/{{ .BinaryName }}_Darwin_x86_64.tar.gz"
head "https://github.com/{{ .Repo }}.git"
version "{{ .Tag }}"

View File

@ -31,7 +31,7 @@ func assertDefaultTemplateData(t *testing.T, formulae string) {
assert := assert.New(t)
assert.Contains(formulae, "class Test < Formula")
assert.Contains(formulae, "homepage \"https://google.com\"")
assert.Contains(formulae, "url \"https://github.com/caarlos0/test/releases/download/v0.1.3/test_#{%x(uname -s).gsub(/\\n/, '')}_#{%x(uname -m).gsub(/\\n/, '')}.tar.gz\"")
assert.Contains(formulae, "url \"https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz\"")
assert.Contains(formulae, "head \"https://github.com/caarlos0/test.git\"")
assert.Contains(formulae, "version \"v0.1.3\"")
assert.Contains(formulae, "bin.install \"test\"")