From a997f8918ea4e748657b4feb60dda84044c50ffd Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 18 Aug 2021 13:23:19 +0300 Subject: [PATCH] [ci] Bump ghr tool used to post release artifacts to v0.14.0 Also make sure we only download it once per CI run, not three times... --- .ci/publish_release_artifact.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.ci/publish_release_artifact.sh b/.ci/publish_release_artifact.sh index 365734144..272d90bed 100755 --- a/.ci/publish_release_artifact.sh +++ b/.ci/publish_release_artifact.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash + set -e set -o pipefail @@ -7,11 +8,13 @@ if [[ -z $GITHUB_TOKEN ]]; then exit fi -mkdir -p $HOME/.local/bin -export _GHR_VER=v0.13.0 -export _GHR=ghr_${_GHR_VER}_linux_amd64 -curl -sfL https://github.com/tcnksm/ghr/releases/download/$_GHR_VER/$_GHR.tar.gz | - tar xz -C $HOME/.local/bin --strip-components=1 $_GHR/ghr +if ! hash ghr 2> /dev/null; then + _GHR_VER=v0.14.0 + _GHR=ghr_${_GHR_VER}_linux_amd64 + mkdir -p $HOME/.local/bin + curl -sfL https://github.com/tcnksm/ghr/releases/download/$_GHR_VER/$_GHR.tar.gz | + tar xz -C $HOME/.local/bin --strip-components=1 $_GHR/ghr +fi ghr -replace \ -u $CIRCLE_PROJECT_USERNAME \