Skip to content

Commit

Permalink
feat: upgrade to go 1.14 (#1372)
Browse files Browse the repository at this point in the history
* feat: upgrade to go 1.14

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

* fix: tests

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

* fix: test

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

* fix: test

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Mar 4, 2020
1 parent 2e69fa0 commit 0204293
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
dist: bionic
language: go
go: '1.13.x'
go: '1.14.x'
services:
- docker
addons:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -10,7 +10,7 @@ conduct](/CODE_OF_CONDUCT.md).
Prerequisites:

- `make`
- [Go 1.13+](https://golang.org/doc/install)
- [Go 1.14+](https://golang.org/doc/install)
- [snapcraft](https://snapcraft.io/)
- [Docker](https://www.docker.com/)
- `gpg` (probably already installed on your system)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM golang:1.13-alpine
FROM golang:1.14-alpine

RUN apk add --no-cache bash \
bzr \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.cgo
@@ -1,4 +1,4 @@
FROM golang:1.13-alpine
FROM golang:1.14-alpine

RUN apk add --no-cache bash \
build-base \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -8,7 +8,7 @@ export GOPROXY = https://proxy.golang.org,direct

# Install all the build and lint dependencies
setup:
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- v1.23.1
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- v1.23.7
curl -sfL https://install.goreleaser.com/github.com/gohugoio/hugo.sh | sh -s -- v0.63.2
curl -sfL https://git.io/misspell | sh -s -- v0.3.4
go mod tidy
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module github.com/goreleaser/goreleaser

go 1.13
go 1.14

require (
code.gitea.io/sdk/gitea v0.0.0-20200128061546-ea2b5af37297
Expand Down
8 changes: 0 additions & 8 deletions go.sum
Expand Up @@ -145,10 +145,6 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/kamilsk/retry/v4 v4.5.0 h1:TcfpmIdzFEfSWLwHJhA+WPAmo5qT2pl/HqqzFat2M+I=
github.com/kamilsk/retry/v4 v4.5.0/go.mod h1:pIQtBtycHTXScrJmpu3N2SSBT07s07Uruq2Au1aRLks=
github.com/kamilsk/retry/v4 v4.7.1 h1:mNg/RQ1X9QlInxBqz63ubBXgh/7D63aePBWZbQQr7pE=
github.com/kamilsk/retry/v4 v4.7.1/go.mod h1:pIQtBtycHTXScrJmpu3N2SSBT07s07Uruq2Au1aRLks=
github.com/kamilsk/retry/v4 v4.7.2 h1:8C33aqTQtTSvPf7MpLZ4xSY4JZK2YCvY+hTlsbiHNq8=
github.com/kamilsk/retry/v4 v4.7.2/go.mod h1:pIQtBtycHTXScrJmpu3N2SSBT07s07Uruq2Au1aRLks=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
Expand Down Expand Up @@ -202,8 +198,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.0 h1:DMOzIV76tmoDNE9pX6RSN0aDtCYeCg5VueieJaAo1uw=
github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=
Expand All @@ -212,8 +206,6 @@ github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPf
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
github.com/ulikunitz/xz v0.5.6 h1:jGHAfXawEGZQ3blwU5wnWKQJvAraT7Ftq9EXjnXYgt8=
github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
github.com/xanzy/go-gitlab v0.26.0 h1:eAnJRBUC+GDJSy8OoGCZBqBMpXsGOOT235TFm/F8C0Q=
github.com/xanzy/go-gitlab v0.26.0/go.mod h1:t4Bmvnxj7k37S4Y17lfLx+nLqkf/oQwT2HagfWKv5Og=
github.com/xanzy/go-gitlab v0.27.0 h1:zy7xBB8+PID6izH07ZArtkEisJ192dtQajRaeo4+glg=
github.com/xanzy/go-gitlab v0.27.0/go.mod h1:t4Bmvnxj7k37S4Y17lfLx+nLqkf/oQwT2HagfWKv5Og=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
Expand Down
4 changes: 2 additions & 2 deletions internal/client/github_test.go
Expand Up @@ -29,7 +29,7 @@ func TestNewGitHubClient(t *testing.T) {
},
}))

require.EqualError(t, err, "parse ://github.mycompany.com/api: missing protocol scheme")
require.EqualError(t, err, `parse "://github.mycompany.com/api": missing protocol scheme`)
})

t.Run("bad upload url", func(t *testing.T) {
Expand All @@ -40,7 +40,7 @@ func TestNewGitHubClient(t *testing.T) {
},
}))

require.EqualError(t, err, "parse not a url:4994: first path segment in URL cannot contain colon")
require.EqualError(t, err, `parse "not a url:4994": first path segment in URL cannot contain colon`)
})
}

Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/artifactory/artifactory_test.go
Expand Up @@ -634,7 +634,7 @@ func TestRunPipe_UnparsableTarget(t *testing.T) {
})

assert.NoError(t, Pipe{}.Default(ctx))
assert.EqualError(t, Pipe{}.Publish(ctx), `artifactory: upload failed: parse ://artifacts.company.com/example-repo-local/mybin/darwin/amd64/mybin: missing protocol scheme`)
assert.EqualError(t, Pipe{}.Publish(ctx), `artifactory: upload failed: parse "://artifacts.company.com/example-repo-local/mybin/darwin/amd64/mybin": missing protocol scheme`)
}

func TestRunPipe_SkipWhenPublishFalse(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/upload/upload_test.go
Expand Up @@ -550,7 +550,7 @@ func TestRunPipe_UnparsableTarget(t *testing.T) {
Type: artifact.UploadableBinary,
})

assert.EqualError(t, Pipe{}.Publish(ctx), `upload: upload failed: parse ://artifacts.company.com/example-repo-local/mybin/darwin/amd64/mybin: missing protocol scheme`)
assert.EqualError(t, Pipe{}.Publish(ctx), `upload: upload failed: parse "://artifacts.company.com/example-repo-local/mybin/darwin/amd64/mybin": missing protocol scheme`)
}

func TestRunPipe_SkipWhenPublishFalse(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Expand Up @@ -231,7 +231,7 @@ func createMainGo(t *testing.T) {
func goModInit(t *testing.T) {
createFile(t, "go.mod", `module foo
go 1.13
go 1.14
`)
}

Expand Down
2 changes: 1 addition & 1 deletion www/content/actions.md
Expand Up @@ -31,7 +31,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x
go-version: 1.14.x
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
Expand Down
4 changes: 2 additions & 2 deletions www/content/ci.md
Expand Up @@ -73,7 +73,7 @@ workflows:
jobs:
release:
docker:
- image: circleci/golang:1.13
- image: circleci/golang:1.14
steps:
- checkout
- run: curl -sL https://git.io/goreleaser | bash
Expand Down Expand Up @@ -404,7 +404,7 @@ steps:
BuildMyApp:
title: Compiling go code
stage: build
image: 'golang:1.13'
image: 'golang:1.14'
commands:
- go build
ReleaseMyApp:
Expand Down

0 comments on commit 0204293

Please sign in to comment.