Skip to content

Commit

Permalink
Merge pull request #12736 from hashicorp/build-update-go-1.17.9
Browse files Browse the repository at this point in the history
build: update golang to 1.17.9
  • Loading branch information
shoenig authored and lgfa29 committed Apr 28, 2022
1 parent 8ee74b8 commit b101bdd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ executors:
go:
working_directory: /go/src/github.com/hashicorp/nomad
docker:
- image: docker.mirror.hashicorp.services/golang:1.17.5
- image: docker.mirror.hashicorp.services/golang:1.17.9
resource_class: medium
environment:
<<: *common_envs
Expand All @@ -522,7 +522,7 @@ executors:
resource_class: large
environment: &machine_env
<<: *common_envs
GOLANG_VERSION: 1.17.5
GOLANG_VERSION: 1.17.9

go-macos:
working_directory: ~/go/src/github.com/hashicorp/nomad
Expand All @@ -531,7 +531,7 @@ executors:
environment:
<<: *common_envs
GOPATH: /Users/distiller/go
GOLANG_VERSION: 1.17.5
GOLANG_VERSION: 1.17.9

go-windows:
machine:
Expand All @@ -543,7 +543,7 @@ executors:
GOPATH: c:\gopath
GOBIN: c:\gopath\bin
GOTESTSUM_PATH: c:\tmp\test-reports
GOLANG_VERSION: 1.17.5
GOLANG_VERSION: 1.17.9
GOTESTSUM_VERSION: 1.7.0
VAULT_VERSION: 1.4.1

Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.7
1.17.9
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.17.5+](https://golang.org/) *(Note: `gcc-go` is not supported)*
1. Install [Go 1.17.9+](https://golang.org/) *(Note: `gcc-go` is not supported)*
1. Clone this repo
```sh
$ git clone https://github.com/hashicorp/nomad.git
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.17.5"
local go_version="1.17.9"
local download=
download="https://storage.googleapis.com/golang/go${go_version}.darwin-amd64.tar.gz"
Expand Down
13 changes: 10 additions & 3 deletions scripts/update_golang_version.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
#!/bin/sh
#!/usr/bin/env bash

set -euo pipefail

if [ -z "$1" ]; then
echo "usage: $0 GO_VERSION"
echo ""
echo "(run in project directory)"
echo "For example: $0 1.15.5"
exit 1
fi

golang_version="$1"

current_version=$(grep -o -E -e '/golang:[.0-9]+' .circleci/config.yml | head -n1 | cut -d: -f2)
# read current version from canonical .go-version file
current_version=$(cat .go-version)
if [ -z "${current_version}" ]; then
echo "unable to find current go version"
exit 1
fi
echo "--> Replacing Go ${current_version} with Go ${golang_version} ..."

# force the canonical .go-version file
echo "${golang_version}" > .go-version

# To support both GNU and BSD sed, the regex is looser than it needs to be.
# Specifically, we use "* instead of "?, which relies on GNU extension without much loss of
# correctness in practice.

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
Expand Down
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.17.5"
local go_version="1.17.9"
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

0 comments on commit b101bdd

Please sign in to comment.