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

Merge pull request #123 from goreleaser/fields

using strings.Fields instead of strings.Split on space
This commit is contained in:
Carlos Alexandro Becker 2017-02-23 09:38:43 -03:00 committed by GitHub
commit e81eac4e35

View File

@ -44,7 +44,7 @@ func build(name, goos, goarch string, ctx *context.Context) error {
output := "dist/" + name + "/" + ctx.Config.Build.BinaryName + extFor(goos)
log.Println("Building", output)
if ctx.Config.Build.Hooks.Pre != "" {
cmd := strings.Split(ctx.Config.Build.Hooks.Pre, " ")
cmd := strings.Fields(ctx.Config.Build.Hooks.Pre)
if err := run(goos, goarch, cmd); err != nil {
return err
}
@ -58,7 +58,7 @@ func build(name, goos, goarch string, ctx *context.Context) error {
return err
}
if ctx.Config.Build.Hooks.Post != "" {
cmd := strings.Split(ctx.Config.Build.Hooks.Post, " ")
cmd := strings.Fields(ctx.Config.Build.Hooks.Post)
if err := run(goos, goarch, cmd); err != nil {
return err
}