Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to using golang 1.12.15 #6950

Merged
merged 4 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .circleci/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ executors:
go:
working_directory: /go/src/github.com/hashicorp/nomad
docker:
- image: golang:1.12.13
- image: golang:1.12.15
environment:
<<: *common_envs
GOPATH: /go
Expand All @@ -33,7 +33,7 @@ executors:
environment: &machine_env
<<: *common_envs
GOPATH: /home/circleci/go
GOLANG_VERSION: "1.12.13"
GOLANG_VERSION: 1.12.15

# uses a more recent image with unattended upgrades disabled properly
# but seems to break docker builds
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Who Uses Nomad
Contributing to Nomad
--------------------

If you wish to contribute to Nomad, you will need [Go](https://www.golang.org) installed on your machine (version 1.12.13+ is *required*, and `gcc-go` is not supported).
If you wish to contribute to Nomad, you will need [Go](https://www.golang.org) installed on your machine (version 1.12.15+ is *required*, and `gcc-go` is not supported).

See the [`contributing`](contributing/) directory for more developer documentation.

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ install:
cd %APPVEYOR_BUILD_FOLDER%
rmdir /Q/S C:\go

# install go 1.12.13 to match version used for cutting a release
# install the go version used for cutting a release
- cmd: |
mkdir c:\go
appveyor DownloadFile "https://dl.google.com/go/go1.12.13.windows-amd64.zip" -FileName "%TEMP%\\go.zip"
appveyor DownloadFile "https://dl.google.com/go/go1.12.15.windows-amd64.zip" -FileName "%TEMP%\\go.zip"

- ps: Expand-Archive $Env:TEMP\go.zip -DestinationPath C:\

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.12.13"
local go_version="1.12.15"
local download=

download="https://storage.googleapis.com/golang/go${go_version}.darwin-amd64.tar.gz"
Expand Down
30 changes: 30 additions & 0 deletions scripts/update_golang_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

golang_version="$1"

current_version=$(grep -o -e 'golang:[.0-9]*' .circleci/config.yml | head -n1 | cut -d: -f2)

# 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
Copy link
Member

Choose a reason for hiding this comment

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

without much loss of
Looks like we dropped the end of this line.

# correctness in practice.
sed -i'' -e "s|golang:[.0-9]*|golang:${golang_version}|g" \
.circleci/config/config.yml .circleci/config.yml
sed -i'' -e "s|GOLANG_VERSION:[ \"]*[.0-9]*\"*|GOLANG_VERSION: ${golang_version}|g" \
.circleci/config/config.yml .circleci/config.yml

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

sed -i'' -e "s|go[.0-9]*.windows-amd64.zip|go${golang_version}.windows-amd64.zip|g" \
appveyor.yml

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

# check if there is any remaining references to old versions
if git grep -I --fixed-strings "${current_version}" | grep -v -e CHANGELOG.md -e vendor/
then
echo " ^^ files 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
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

function install_go() {
local go_version=1.12.13
local go_version="1.12.15"
local download=

download="https://storage.googleapis.com/golang/go${go_version}.linux-amd64.tar.gz"
Expand Down