@marcel91200 / caddy Mirror · read-only / commits / eb3955a9
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

ci: accommodate go1.16 changes to go mod (#4102)

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.

Mohammed Al Sahaf committed Apr 1, 2021 at 22:07 UTC eb3955a960a7185b9b5b3eed5be9dda2b97cee69
1 file changed +3
.goreleaser.yml
+3
@@ -11,6 +11,9 @@ before:
11 # GoReleaser doesn't seem to offer {{.Tag}} at this stage, so we have to embed it into the env
12 # so we run: TAG=$(git describe --abbrev=0) goreleaser release --rm-dist --skip-publish --skip-validate
13 - go mod edit -require=github.com/caddyserver/caddy/v2@{{.Env.TAG}} ./caddy-build/go.mod
14 + # as of Go 1.16, `go` commands no longer automatically change go.{mod,sum}. We now have to explicitly
15 + # run `go mod tidy`. The `/bin/sh -c '...'` is because goreleaser can't find cd in PATH without shell invocation.
16 + - /bin/sh -c 'cd ./caddy-build && go mod tidy'
17 - git clone --depth 1 https://github.com/caddyserver/dist caddy-dist
18 - go mod download
19