Skip to content

Commit

Permalink
ci: Install go using install_go.sh
Browse files Browse the repository at this point in the history
This script will install the recommened version
in versions.txt from runtime.

Fixes: clearcontainers#966

Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
  • Loading branch information
jcvenegas committed Apr 5, 2018
1 parent fdb4fc7 commit e3e5e7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .ci/install_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ finish() {
}

die() {
echo >&2 -e "\e[1mERROR\e[0m: $*"
echo >&2 -e "ERROR: $*"
exit 1
}

info() {
echo -e "\e[1mINFO\e[0m: $*"
echo -e "INFO: $*"
}

usage(){
Expand All @@ -59,7 +59,6 @@ EOT
exit "$exit_code"
}


trap finish EXIT

pushd "${tmp_dir}"
Expand All @@ -72,7 +71,6 @@ do
esac
done


go_version="${1:-""}"
if [ -z "$go_version" ];then
usage 0
Expand All @@ -81,14 +79,10 @@ elif [ -n "${USE_VERSIONS_FILE}" ] ;then
get_cc_versions
fi



info "Download go version ${go_version}"
curl -OL https://storage.googleapis.com/golang/go${go_version}.linux-amd64.tar.gz
info "Remove old go installation"
sudo rm -r /usr/local/go/
info "Install go"
sudo tar -C /usr/local -xzf go${go_version}.linux-amd64.tar.gz
popd


2 changes: 2 additions & 0 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ if [ -n "$PULL_REQUEST_NUMBER" ] || [ -n "$LOCALCI_PR_NUMBER" ]; then
bash -f "${cidir}/run_fetch_branches_tool.sh"
fi

echo "Install go"
bash -c "${cidir}/install_go.sh -p"

echo "Install shim"
bash -f ${cidir}/install_shim.sh
Expand Down

0 comments on commit e3e5e7c

Please sign in to comment.