Skip to content

Commit

Permalink
CI: Ensure downloaded version of golang used
Browse files Browse the repository at this point in the history
The script used to install golang was downloading and installing the
binary package, but not actually using the new golang version.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
  • Loading branch information
jodh-intel committed Oct 23, 2018
1 parent e2cfe73 commit 8f9f01d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .ci/install_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,13 @@ info "Install go"
mkdir -p "${install_dest}"
sudo tar -C "${install_dest}" -xzf "${archive}"
popd

# Make sure we use the golang version we just installed
goroot="${install_dest}/go"

[ -d "${goroot}" ] || die "failed to find expected golang path ${goroot} (from ${archive})"

export GOROOT="${goroot}"
export PATH="$GOROOT/bin:$PATH"

info "Using golang binary $(command -v go) version $(go version)"

0 comments on commit 8f9f01d

Please sign in to comment.