You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-17 01:42:37 +02:00
docs: better env docs
closes #1795 Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
@ -4,13 +4,14 @@ title: Environment Variables
|
|||||||
|
|
||||||
Global environment variables to be passed down to all hooks and builds.
|
Global environment variables to be passed down to all hooks and builds.
|
||||||
|
|
||||||
This is useful for `GO111MODULE`, for example. You can have your
|
This is useful for `GO111MODULE`, for example. You can have your `.goreleaser.yml` file like the following:
|
||||||
`.goreleaser.yml` file like the following:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# .goreleaser.yml
|
# .goreleaser.yml
|
||||||
env:
|
env:
|
||||||
- GO111MODULE=on
|
- GO111MODULE=on
|
||||||
|
- FOO={{ .Env.FOOBAR }}
|
||||||
|
- ENV_WITH_DEFAULT={{ if index .Env "ENV_WITH_DEFAULT" }}{{ .Env.ENV_WITH_DEFAULT }}{{ else }}default_value{{ end }}
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
|
Reference in New Issue
Block a user