Skip to content

Commit

Permalink
CI: Use variable to avoid duplication
Browse files Browse the repository at this point in the history
Use a variable in the golang install script to avoid repetition.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
  • Loading branch information
jodh-intel committed Oct 23, 2018
1 parent 31fe4da commit e2cfe73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .ci/install_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ case "$(arch)" in
;;
esac

archive="go${go_version}.linux-${goarch}.tar.gz"

info "Download go version ${go_version}"
curl -OL "https://storage.googleapis.com/golang/go${go_version}.linux-${goarch}.tar.gz"
curl -OL "https://storage.googleapis.com/golang/${archive}"
info "Install go"
mkdir -p "${install_dest}"
sudo tar -C "${install_dest}" -xzf "go${go_version}.linux-${goarch}.tar.gz"
sudo tar -C "${install_dest}" -xzf "${archive}"
popd

0 comments on commit e2cfe73

Please sign in to comment.