diff options
author | Mohammed Al Sahaf <[email protected]> | 2021-04-01 22:07:32 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-01 16:07:32 -0600 |
commit | eb3955a960a7185b9b5b3eed5be9dda2b97cee69 (patch) | |
tree | e8480b5975c32cbc6e23a91e706597f82530d55f /.goreleaser.yml | |
parent | d21e88ae3a9d8d57c4d41c1c7c76c6a15f539898 (diff) | |
download | caddy-eb3955a960a7185b9b5b3eed5be9dda2b97cee69.tar.gz caddy-eb3955a960a7185b9b5b3eed5be9dda2b97cee69.zip |
ci: accommodate go1.16 changes to go mod (#4102)v2.4.0-beta.2
As of go1.16, the `go` commands will no longer make automatic changes to go.{mod,sum} files (see: https://blog.golang.org/go116-module-changes). This broke the release script which relied on `go mod download` and/or `go build` to automatically generate the go.sum file. This commit explicitly invokes `go mod tidy` to have the go.sum file generated.
Diffstat (limited to '.goreleaser.yml')
-rw-r--r-- | .goreleaser.yml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.goreleaser.yml b/.goreleaser.yml index 9bdf2214a..871f92fa9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -11,6 +11,9 @@ before: # GoReleaser doesn't seem to offer {{.Tag}} at this stage, so we have to embed it into the env # so we run: TAG=$(git describe --abbrev=0) goreleaser release --rm-dist --skip-publish --skip-validate - go mod edit -require=github.com/caddyserver/caddy/v2@{{.Env.TAG}} ./caddy-build/go.mod + # as of Go 1.16, `go` commands no longer automatically change go.{mod,sum}. We now have to explicitly + # run `go mod tidy`. The `/bin/sh -c '...'` is because goreleaser can't find cd in PATH without shell invocation. + - /bin/sh -c 'cd ./caddy-build && go mod tidy' - git clone --depth 1 https://github.com/caddyserver/dist caddy-dist - go mod download |