mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-14 03:51:24 +02:00
fix(ci): go mod tidy (#2090)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
parent
4f7968316f
commit
5e23177a4c
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -61,6 +61,9 @@ jobs:
|
|||||||
name: Check
|
name: Check
|
||||||
run: |
|
run: |
|
||||||
./goreleaser check
|
./goreleaser check
|
||||||
|
-
|
||||||
|
name: Diff
|
||||||
|
run: git diff
|
||||||
-
|
-
|
||||||
name: Docker Login
|
name: Docker Login
|
||||||
if: success() && startsWith(github.ref, 'refs/tags/v')
|
if: success() && startsWith(github.ref, 'refs/tags/v')
|
||||||
|
@ -2,7 +2,7 @@ env:
|
|||||||
- GO111MODULE=on
|
- GO111MODULE=on
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod download
|
- go mod tidy
|
||||||
- ./scripts/completions.sh
|
- ./scripts/completions.sh
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
|
2
Makefile
2
Makefile
@ -8,7 +8,7 @@ export GOPROXY = https://proxy.golang.org,direct
|
|||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
setup:
|
setup:
|
||||||
go mod download
|
go mod tidy
|
||||||
.PHONY: setup
|
.PHONY: setup
|
||||||
|
|
||||||
# Run all the tests
|
# Run all the tests
|
||||||
|
2
cmd/testdata/good.yml
vendored
2
cmd/testdata/good.yml
vendored
@ -3,7 +3,7 @@
|
|||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
# You may remove this if you don't use go modules.
|
# You may remove this if you don't use go modules.
|
||||||
- go mod download
|
- go mod tidy
|
||||||
# you may remove this if you don't need go generate
|
# you may remove this if you don't need go generate
|
||||||
- go generate ./...
|
- go generate ./...
|
||||||
builds:
|
builds:
|
||||||
|
@ -9,7 +9,7 @@ const ExampleConfig = `# This is an example .goreleaser.yml file with some sane
|
|||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
# You may remove this if you don't use go modules.
|
# You may remove this if you don't use go modules.
|
||||||
- go mod download
|
- go mod tidy
|
||||||
# you may remove this if you don't need go generate
|
# you may remove this if you don't need go generate
|
||||||
- go generate ./...
|
- go generate ./...
|
||||||
builds:
|
builds:
|
||||||
|
@ -252,13 +252,13 @@ Environment variables are inherited and overridden in the following order:
|
|||||||
try to download the dependencies. Since several builds run in parallel, it is
|
try to download the dependencies. Since several builds run in parallel, it is
|
||||||
very likely to fail.
|
very likely to fail.
|
||||||
|
|
||||||
You can solve this by running `go mod download` before calling `goreleaser` or
|
You can solve this by running `go mod tidy` before calling `goreleaser` or
|
||||||
by adding a [hook][] doing that on your `.goreleaser.yml` file:
|
by adding a [hook][] doing that on your `.goreleaser.yml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod download
|
- go mod tidy
|
||||||
# rest of the file...
|
# rest of the file...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -13,11 +13,11 @@ env:
|
|||||||
- GO111MODULE=on
|
- GO111MODULE=on
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod download
|
- go mod tidy
|
||||||
builds:
|
builds:
|
||||||
- binary: program
|
- binary: program
|
||||||
```
|
```
|
||||||
|
|
||||||
This way, both `go mod download` and the underlying `go build` will have
|
This way, both `go mod tidy` and the underlying `go build` will have
|
||||||
`GO111MODULE` set to `on`.
|
`GO111MODULE` set to `on`.
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ before:
|
|||||||
hooks:
|
hooks:
|
||||||
- make clean
|
- make clean
|
||||||
- go generate ./...
|
- go generate ./...
|
||||||
- go mod download
|
- go mod tidy
|
||||||
- touch {{ .Env.FILE_TO_TOUCH }}
|
- touch {{ .Env.FILE_TO_TOUCH }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user