mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
adding logs for pre and post build hooks
This commit is contained in:
parent
09e1e4595c
commit
0aa98cef67
@ -47,6 +47,7 @@ func build(name, goos, goarch string, ctx *context.Context) error {
|
||||
output := "dist/" + name + "/" + ctx.Config.Build.Binary + extFor(goos)
|
||||
log.Println("Building", output)
|
||||
if ctx.Config.Build.Hooks.Pre != "" {
|
||||
log.Println("Running pre-build hook", ctx.Config.Build.Hooks.Pre)
|
||||
cmd := strings.Fields(ctx.Config.Build.Hooks.Pre)
|
||||
if err := run(goos, goarch, cmd); err != nil {
|
||||
return err
|
||||
@ -61,6 +62,7 @@ func build(name, goos, goarch string, ctx *context.Context) error {
|
||||
return err
|
||||
}
|
||||
if ctx.Config.Build.Hooks.Post != "" {
|
||||
log.Println("Running post-build hook", ctx.Config.Build.Hooks.Post)
|
||||
cmd := strings.Fields(ctx.Config.Build.Hooks.Post)
|
||||
if err := run(goos, goarch, cmd); err != nil {
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user