You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-06-23 00:40:06 +02:00
@ -12,6 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/skips"
|
||||
"github.com/goreleaser/goreleaser/internal/testctx"
|
||||
"github.com/goreleaser/goreleaser/internal/testlib"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
@ -329,6 +330,13 @@ func TestRun(t *testing.T) {
|
||||
require.Contains(t, err.Error(), "post hook failed")
|
||||
})
|
||||
|
||||
t.Run("skipping post-hook", func(t *testing.T) {
|
||||
ctx := ctx5
|
||||
skips.Set(ctx, skips.PostBuildHooks)
|
||||
ctx.Config.UniversalBinaries[0].Hooks.Post = []config.Hook{{Cmd: "exit 1"}}
|
||||
require.NoError(t, Pipe{}.Run(ctx))
|
||||
})
|
||||
|
||||
t.Run("hook with env tmpl", func(t *testing.T) {
|
||||
ctx := ctx5
|
||||
ctx.Config.UniversalBinaries[0].Hooks.Pre = []config.Hook{{
|
||||
|
Reference in New Issue
Block a user