Skip to content

Commit

Permalink
Merge pull request #10151 from hashicorp/c-golang-1.16
Browse files Browse the repository at this point in the history
Update to Golang 1.16
  • Loading branch information
Mahmood Ali authored Mar 9, 2021
2 parents df298a4 + bc64f26 commit 74f72fb
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 510 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ executors:
go:
working_directory: /go/src/github.com/hashicorp/nomad
docker:
- image: docker.mirror.hashicorp.services/golang:1.15.6
- image: docker.mirror.hashicorp.services/golang:1.16
environment:
<<: *common_envs
GOPATH: /go
Expand All @@ -516,7 +516,7 @@ executors:
environment: &machine_env
<<: *common_envs
GOPATH: /home/circleci/go
GOLANG_VERSION: 1.15.6
GOLANG_VERSION: 1.16

# uses a more recent image with unattended upgrades disabled properly
# but seems to break docker builds
Expand All @@ -533,7 +533,7 @@ executors:
environment:
<<: *common_envs
GOPATH: /Users/distiller/go
GOLANG_VERSION: 1.15.6
GOLANG_VERSION: 1.16

go-windows:
machine:
Expand All @@ -545,7 +545,7 @@ executors:
GOPATH: c:\gopath
GOBIN: c:\gopath\bin
GOTESTSUM_PATH: c:\tmp\test-reports
GOLANG_VERSION: 1.15.6
GOLANG_VERSION: 1.16
GOTESTSUM_VERSION: 0.4.2
VAULT_VERSION: 1.4.1

Expand Down
20 changes: 10 additions & 10 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,21 @@ bootstrap: deps lint-deps git-hooks # Install all dependencies
deps: ## Install build and development dependencies
## Keep versions in sync with tools/go.mod for now (see https://github.com/golang/go/issues/30515)
@echo "==> Updating build dependencies..."
GO111MODULE=on cd tools && go get github.com/hashicorp/go-bindata/go-bindata@bf7910af899725e4938903fb32048c7c0b15f12e
GO111MODULE=on cd tools && go get github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs@234c15e7648ff35458026de92b34c637bae5e6f7
GO111MODULE=on cd tools && go get github.com/a8m/tree/cmd/tree@fce18e2a750ea4e7f53ee706b1c3d9cbb22de79c
GO111MODULE=on cd tools && go get gotest.tools/[email protected]
GO111MODULE=on cd tools && go get github.com/hashicorp/hcl/v2/cmd/[email protected]
GO111MODULE=on cd tools && go get github.com/golang/protobuf/[email protected]
GO111MODULE=on cd tools && go get github.com/hashicorp/go-msgpack/codec/[email protected]
go install github.com/hashicorp/go-bindata/go-bindata@bf7910af899725e4938903fb32048c7c0b15f12e
go install github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs@234c15e7648ff35458026de92b34c637bae5e6f7
go install github.com/a8m/tree/cmd/tree@fce18e2a750ea4e7f53ee706b1c3d9cbb22de79c
go install gotest.tools/[email protected]
go install github.com/hashicorp/hcl/v2/cmd/[email protected]
go install github.com/golang/protobuf/[email protected]
go install github.com/hashicorp/go-msgpack/codec/[email protected]

.PHONY: lint-deps
lint-deps: ## Install linter dependencies
## Keep versions in sync with tools/go.mod (see https://github.com/golang/go/issues/30515)
@echo "==> Updating linter dependencies..."
GO111MODULE=on cd tools && go get github.com/golangci/golangci-lint/cmd/[email protected]
GO111MODULE=on cd tools && go get github.com/client9/misspell/cmd/[email protected]
GO111MODULE=on cd tools && go get github.com/hashicorp/go-hclog/[email protected]
go install github.com/golangci/golangci-lint/cmd/[email protected]
go install github.com/client9/misspell/cmd/[email protected]
go install github.com/hashicorp/go-hclog/[email protected]

.PHONY: git-hooks
git-dir = $(shell git rev-parse --git-dir)
Expand Down
2 changes: 1 addition & 1 deletion contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A development environment is supplied via Vagrant to make getting started easier

Developing without Vagrant
---
1. Install [Go 1.15.6+](https://golang.org/) *(Note: `gcc-go` is not supported)*
1. Install [Go 1.16+](https://golang.org/) *(Note: `gcc-go` is not supported)*
1. Clone this repo
```sh
$ git clone https://github.com/hashicorp/nomad.git
Expand Down
14 changes: 4 additions & 10 deletions contributing/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ version.

| Nomad Version | Go Version |
|:-------------:|:----------:|
| 1.0.2 | 1.15.6 |
| 1.0 | 1.15.5 |
| 0.12.2 | 1.14.7 |
| 0.12.1 | 1.14.6 |
| 0.12.0 | 1.14.4 |
| 0.11.4 | 1.14.6 |
| 0.11.3 | 1.14.3 |
| 0.11.0 | 1.14.1 |
| 0.10.4 | 1.12.16 |
| 0.10.2 | 1.12.13 |
| 1.1 | 1.16 |
| 1.0 | 1.15 |
| 0.12 | 1.14 |
| 0.11 | 1.14 |
| 0.10 | 1.12 |
| 0.9 | 1.11 |

Expand Down
2 changes: 1 addition & 1 deletion scripts/release/mac-remote-build
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ REPO_PATH="${TMP_WORKSPACE}/gopath/src/github.com/hashicorp/nomad"
mkdir -p "${TMP_WORKSPACE}/tmp"
install_go() {
local go_version="1.15.6"
local go_version="1.16"
local download=
download="https://storage.googleapis.com/golang/go${go_version}.darwin-amd64.tar.gz"
Expand Down
8 changes: 4 additions & 4 deletions scripts/update_golang_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ sed -i'' -e "s|/golang:[.0-9]*|/golang:${golang_version}|g" .circleci/config.yml
sed -i'' -e "s|GOLANG_VERSION:[ \"]*[.0-9]*\"*|GOLANG_VERSION: ${golang_version}|g" \
.circleci/config.yml

sed -i'' -e "s|\\(golang.org.*version\\) [.0-9]*|\\1 ${golang_version}|g" \
README.md
sed -i'' -e "s|\\(Install .Go\\) [.0-9]*|\\1 ${golang_version}|g" \
contributing/README.md

sed -i'' -e "s|go_version=\"*[^\"]*\"*$|go_version=\"${golang_version}\"|g" \
scripts/vagrant-linux-priv-go.sh scripts/release/mac-remote-build

echo "--> Checking if there is any remaining references to old versions..."
if git grep -I --fixed-strings "${current_version}" | grep -v -e CHANGELOG.md -e vendor/ -e website/ -e ui/
if git grep -I --fixed-strings "${current_version}" | grep -v -e CHANGELOG.md -e vendor/ -e website/ -e ui/ -e contributing/golang.md -e '.*.go:' -e go.sum -e go.mod -e LICENSE
then
echo " ^^ files contain references to old golang version" >&2
echo " ^^ files may contain references to old golang version" >&2
echo " update script and run again" >&2
exit 1
fi
2 changes: 1 addition & 1 deletion scripts/vagrant-linux-priv-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -o errexit

function install_go() {
local go_version="1.15.6"
local go_version="1.16"
local download="https://storage.googleapis.com/golang/go${go_version}.linux-amd64.tar.gz"

if go version 2>&1 | grep -q "${go_version}"; then
Expand Down
24 changes: 2 additions & 22 deletions tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
module github.com/hashicorp/nomad/tools

go 1.15
go 1.16

require (
github.com/a8m/tree v0.0.0-20201026183218-fce18e2a750e
github.com/aws/aws-sdk-go v1.35.5
github.com/client9/misspell v0.3.4
github.com/elazarl/go-bindata-assetfs v1.0.1
github.com/golang/protobuf v1.3.4
github.com/golangci/golangci-lint v1.24.0
github.com/google/go-cmp v0.4.0 // indirect
github.com/hashicorp/go-bindata v3.0.8-0.20180209072458-bf7910af8997+incompatible
github.com/hashicorp/go-hclog/hclogvet v0.1.3
github.com/hashicorp/go-msgpack v1.1.5
github.com/hashicorp/hcl/v2 v2.5.1
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/stretchr/testify v1.5.1 // indirect
golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gotest.tools/gotestsum v0.4.2
)
require github.com/aws/aws-sdk-go v1.37.26
Loading

0 comments on commit 74f72fb

Please sign in to comment.