From e2cfe73ff3d79f1b0b2919d893fb97805790fa61 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Tue, 23 Oct 2018 12:08:09 +0100 Subject: [PATCH] CI: Use variable to avoid duplication Use a variable in the golang install script to avoid repetition. Signed-off-by: James O. D. Hunt --- .ci/install_go.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.ci/install_go.sh b/.ci/install_go.sh index a07d73ced..7bf8e2277 100755 --- a/.ci/install_go.sh +++ b/.ci/install_go.sh @@ -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