1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-06-23 00:40:06 +02:00

feat: skip pre build hooks

This commit is contained in:
Carlos Alexandro Becker
2023-09-17 16:59:34 +00:00
parent d90c2ca2f2
commit 16d84c5973
5 changed files with 28 additions and 4 deletions

View File

@ -337,6 +337,13 @@ func TestRun(t *testing.T) {
require.NoError(t, Pipe{}.Run(ctx))
})
t.Run("skipping pre-hook", func(t *testing.T) {
ctx := ctx5
skips.Set(ctx, skips.PreBuildHooks)
ctx.Config.UniversalBinaries[0].Hooks.Pre = []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{{