From a4412270ef77b7f4c95f216c529504a2fa1b48d8 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Mon, 4 Mar 2019 16:33:29 +0100 Subject: [PATCH] Switch to Go 1.12 It also pins errcheck to the latest stable release and simplifies how it gets installed. Signed-off-by: Simon Pasquier --- .circleci/config.yml | 2 +- .promu.yml | 2 +- .travis.yml | 2 +- Makefile | 9 +-------- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d6f20a99..036a453a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ executors: # should also be updated. golang: docker: - - image: circleci/golang:1.11 + - image: circleci/golang:1.12 # errcheck requires to be executed from GOPATH for now. working_directory: /go/src/github.com/prometheus/alertmanager diff --git a/.promu.yml b/.promu.yml index 15a96c6f..b62e28ec 100644 --- a/.promu.yml +++ b/.promu.yml @@ -1,7 +1,7 @@ go: # Whenever the Go version is updated here, .travis.yml and # .circle/config.yml should also be updated. - version: 1.11 + version: 1.12 repository: path: github.com/prometheus/alertmanager build: diff --git a/.travis.yml b/.travis.yml index cefe0802..033d692d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # Whenever the Go version is updated here, .circleci/config.yml and .promu.yml # should also be updated. go: -- 1.11.x +- 1.12.x script: # test front-end diff --git a/Makefile b/Makefile index 777645dc..aa8ebeba 100644 --- a/Makefile +++ b/Makefile @@ -63,11 +63,4 @@ test: common-test $(ERRCHECK_BINARY) $(ERRCHECK_BINARY) -verbose -exclude scripts/errcheck_excludes.txt -ignoretests ./... $(ERRCHECK_BINARY): -# Get errcheck from a temporary directory to avoid modifying the local go.{mod,sum}. -# See https://github.com/golang/go/issues/27643. - tmpModule=$$(mktemp -d 2>&1) && \ - mkdir -p $${tmpModule}/staticcheck && \ - cd "$${tmpModule}"/staticcheck && \ - GO111MODULE=on $(GO) mod init example.com/staticcheck && \ - GO111MODULE=on GOOS= GOARCH= $(GO) get github.com/kisielk/errcheck && \ - rm -rf $${tmpModule}; + (cd .. && GO111MODULE=on GOOS= GOARCH= $(GO) get github.com/kisielk/errcheck@v1.2.0)