1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/www/content/env.md
Ben Kochie 7625a70812
fix: Use go mod download (#1345)
Recommend using `go mod download` rather than `go mod tidy` for fetching
dependencies. The `tidy` function is used to update things and chagnes
the dependency graph. Using the `download` function avoids any changes.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-02-17 09:13:28 -03:00

495 B

title series hideFromIndex weight
Environment Variables customization true 19

Global environment variables to be passed down to all hooks and builds.

This is useful for GO111MODULE, for example. You can have your .goreleaser.yaml file like the following:

# .goreleaser.yml
env:
  - GO111MODULE=on
before:
  hooks:
    - go mod download
builds:
- binary: program

This way, both go mod download and the underlying go build will have GO111MODULE set to on.