Skip to content

Commit

Permalink
feat: use go 1.17 (#2408)
Browse files Browse the repository at this point in the history
* feat: use go 1.17

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: go mod tidy

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: fix failing test

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* ci: increase lint timeout

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* ci: increase lint timeout

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Aug 24, 2021
1 parent 04a62ae commit dd5ccf7
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -37,7 +37,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: '1.17'
-
name: Cache Go modules
uses: actions/cache@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Expand Up @@ -14,9 +14,10 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: ~1.16
go-version: ~1.17
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
skip-go-installation: true
args: --timeout=5m
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -10,7 +10,7 @@ conduct](/CODE_OF_CONDUCT.md).
Prerequisites:

- `make`
- [Go 1.16+](https://golang.org/doc/install)
- [Go 1.17+](https://golang.org/doc/install)
- [snapcraft](https://snapcraft.io/)
- [Docker](https://www.docker.com/)
- `gpg` (probably already installed on your system)
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
@@ -1,13 +1,13 @@
FROM golang:1.17.0-alpine

RUN apk add --no-cache bash \
curl \
docker-cli \
docker-cli-buildx \
git \
mercurial \
make \
build-base
curl \
docker-cli \
docker-cli-buildx \
git \
mercurial \
make \
build-base

ENTRYPOINT ["/entrypoint.sh"]
CMD [ "-h" ]
Expand Down
2 changes: 1 addition & 1 deletion cmd/util_test.go
Expand Up @@ -62,7 +62,7 @@ func goModInit(tb testing.TB) {
tb.Helper()
createFile(tb, "go.mod", `module foo
go 1.16
go 1.17
`)
}

Expand Down
89 changes: 88 additions & 1 deletion go.mod
@@ -1,6 +1,6 @@
module github.com/goreleaser/goreleaser

go 1.16
go 1.17

require (
code.gitea.io/sdk/gitea v0.15.0
Expand All @@ -27,3 +27,90 @@ require (
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
gopkg.in/yaml.v2 v2.4.0
)

require (
cloud.google.com/go v0.81.0 // indirect
cloud.google.com/go/storage v1.15.0 // indirect
github.com/AlekSi/pointer v1.1.0 // indirect
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go v54.0.0+incompatible // indirect
github.com/Azure/azure-storage-blob-go v0.13.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.7 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210512092938-c05353c2d58c // indirect
github.com/aws/aws-sdk-go v1.38.35 // indirect
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb // indirect
github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e // indirect
github.com/cenkalti/backoff v2.1.1+incompatible // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dghubble/sling v1.3.0 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.1.0 // indirect
github.com/go-git/go-git/v5 v5.3.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/rpmpack v0.0.0-20210410105602-e20c988a6f5a // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/google/wire v0.5.0 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/goreleaser/chglog v0.1.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-retryablehttp v0.6.8 // indirect
github.com/hashicorp/go-version v1.2.1 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/kevinburke/ssh_config v1.1.0 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mitchellh/copystructure v1.1.2 // indirect
github.com/mitchellh/reflectwalk v1.0.1 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/sassoftware/go-rpmutils v0.0.0-20190420191620-a8f1baeba37b // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20210505214959-0714010a04ed // indirect
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/tools v0.1.2 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.46.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
google.golang.org/grpc v1.38.0 // indirect
google.golang.org/protobuf v1.26.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
6 changes: 3 additions & 3 deletions internal/pipe/gomod/gomod_test.go
Expand Up @@ -225,12 +225,12 @@ func requireGoMod(tb testing.TB, module, version string) {

mod, err := os.ReadFile("dist/proxy/foo/go.mod")
require.NoError(tb, err)
require.Equal(tb, fmt.Sprintf(`module foo
require.Contains(tb, string(mod), fmt.Sprintf(`module foo
go 1.16
go 1.17
require %s %s
`, module, version), string(mod))
`, module, version))
}

func requireMainGo(tb testing.TB, module string) {
Expand Down
2 changes: 1 addition & 1 deletion www/docs/ci/actions.md
Expand Up @@ -37,7 +37,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
2 changes: 1 addition & 1 deletion www/docs/ci/circle.md
Expand Up @@ -18,7 +18,7 @@ workflows:
jobs:
release:
docker:
- image: circleci/golang:1.16
- image: circleci/golang:1.17
steps:
- checkout
- run: curl -sL https://git.io/goreleaser | bash
Expand Down
2 changes: 1 addition & 1 deletion www/docs/ci/codefresh.md
Expand Up @@ -23,7 +23,7 @@ steps:
BuildMyApp:
title: Compiling go code
stage: build
image: 'golang:1.16'
image: 'golang:1.17'
commands:
- go build
ReleaseMyApp:
Expand Down

1 comment on commit dd5ccf7

@vercel
Copy link

@vercel vercel bot commented on dd5ccf7 Aug 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.