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:
parent
60b0bc2416
commit
e08cc50030
@ -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
|
||||
|
@ -17,6 +17,7 @@ before:
|
||||
hooks:
|
||||
- make clean
|
||||
- go generate ./...
|
||||
- go mod download
|
||||
```
|
||||
|
||||
If any of the hooks fails the build process is aborted.
|
||||
|
Loading…
x
Reference in New Issue
Block a user