mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
fixed test
This commit is contained in:
parent
aace3d4813
commit
8b83e59971
@ -25,6 +25,7 @@ var defaultTemplateData = templateData{
|
||||
Name: "Test",
|
||||
Repo: "caarlos0/test",
|
||||
Tag: "v0.1.3",
|
||||
Version: "0.1.3",
|
||||
File: "test_Darwin_x86_64",
|
||||
SHA256: "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c68",
|
||||
Format: "tar.gz",
|
||||
@ -36,7 +37,7 @@ func assertDefaultTemplateData(t *testing.T, formulae string) {
|
||||
assert.Contains(formulae, "homepage \"https://google.com\"")
|
||||
assert.Contains(formulae, "url \"https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz\"")
|
||||
assert.Contains(formulae, "sha256 \"1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c68\"")
|
||||
assert.Contains(formulae, "version \"v0.1.3\"")
|
||||
assert.Contains(formulae, "version \"0.1.3\"")
|
||||
assert.Contains(formulae, "bin.install \"test\"")
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,8 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/goreleaser/goreleaser/context"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
var linuxArchives = []struct {
|
||||
@ -39,14 +38,14 @@ func (Pipe) Description() string {
|
||||
|
||||
// Run the pipe
|
||||
func (Pipe) Run(ctx *context.Context) error {
|
||||
if len(ctx.Config.FPM.Formats) == 0 {
|
||||
log.Println("No output formats configured, skipping")
|
||||
return nil
|
||||
}
|
||||
cmd := exec.Command("which", "fpm")
|
||||
if err := cmd.Run(); err != nil {
|
||||
return ErrNoFPM
|
||||
}
|
||||
if len(ctx.Config.FPM.Formats) == 0 {
|
||||
log.Println("No output formats configured")
|
||||
return nil
|
||||
}
|
||||
var g errgroup.Group
|
||||
for _, format := range ctx.Config.FPM.Formats {
|
||||
for _, archive := range linuxArchives {
|
||||
|
Loading…
Reference in New Issue
Block a user