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

docs: improve docs on go modules usage

This commit is contained in:
Carlos Alexandro Becker 2018-10-04 22:23:10 -03:00 committed by Carlos Alexandro Becker
parent 60b0bc2416
commit e08cc50030
2 changed files with 19 additions and 0 deletions

View File

@ -110,3 +110,21 @@ Then you can run:
```console
GOVERSION=$(go version) goreleaser
```
## Go Modules
If you use Go 1.11 with go modules or vgo, when GoReleaser runs it may
try to download the dependencies. Since several builds run in parallel, it is
very likely to fail.
You can solve this by running `go mod download` before calling `goreleaser` or
by adding a [hook][] doing that on your `.goreleaser.yaml` file:
```yaml
before:
hooks:
- go mod download
# rest of the file...
```
[hook]: /hooks

View File

@ -17,6 +17,7 @@ before:
hooks:
- make clean
- go generate ./...
- go mod download
```
If any of the hooks fails the build process is aborted.