1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-04-13 11:50:34 +02:00
goreleaser/docs/045-hooks.md
Carlos Alexandro Becker fe85f656e2
style: ran make fmt
2018-04-03 21:37:16 -03:00

20 lines
404 B
Markdown

---
title: Global Hooks
---
Some builds may need pre-build steps before building, e.g. `go generate`.
The `before` section allows for global hooks which will be executed before
the build is started.
The configuration is very simple, here is a complete example:
```yml
# .goreleaser.yml
before:
hooks:
- make clean
- go generate ./...
```
If any of the hooks fails the build process is aborted.