1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00

Log name of skipped archive binary. Make tests consistent.

This commit is contained in:
Jorin Vogel 2017-06-05 19:21:33 +02:00
parent de2b5f4385
commit 415e4e0334
No known key found for this signature in database
GPG Key ID: 647AFD30D56CE8CC
2 changed files with 6 additions and 3 deletions

View File

@ -77,8 +77,9 @@ func create(ctx *context.Context, platform, name string) error {
}
func skip(ctx *context.Context, platform, name string) error {
log.Println("Skip archiving")
var binary = filepath.Join(ctx.Config.Dist, name+ext.For(platform))
b := name + ext.For(platform)
log.Printf("Skip archiving for binary %s", b)
var binary = filepath.Join(ctx.Config.Dist, b)
ctx.AddArtifact(binary)
return nil
}

View File

@ -100,7 +100,9 @@ func TestRunPipeSkip(t *testing.T) {
},
}
assert.NoError(Pipe{}.Run(ctx))
assert.Equal([]string{"mybin.exe", "mybin"}, ctx.Artifacts)
assert.Contains(ctx.Artifacts, "mybin")
assert.Contains(ctx.Artifacts, "mybin.exe")
assert.Len(ctx.Artifacts, 2)
}
func TestRunPipeDistRemoved(t *testing.T) {