From 4b7827829298c2f4a23dfcdc79bd4fcb685ac1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 15 Jun 2023 20:34:09 +0300 Subject: [PATCH] docs: runner script fixes (#4112) Primary motivation here is to fix the runner script on Linux arm64; see the first commit. The other two contain some while-at-it cleanups. --- www/docs/static/run | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/www/docs/static/run b/www/docs/static/run index 59363add6..b8beb6e85 100755 --- a/www/docs/static/run +++ b/www/docs/static/run @@ -23,14 +23,16 @@ test -z "$VERSION" && { TMP_DIR="$(mktemp -d)" # shellcheck disable=SC2064 # intentionally expands here trap "rm -rf \"$TMP_DIR\"" EXIT -export TAR_FILE="$TMP_DIR/${FILE_BASENAME}_$(uname -s)_$(uname -m).tar.gz" +OS="$(uname -s)" +ARCH="$(uname -m)" +test "$ARCH" = "aarch64" && ARCH="arm64" +TAR_FILE="${FILE_BASENAME}_${OS}_${ARCH}.tar.gz" ( cd "$TMP_DIR" echo "Downloading GoReleaser $VERSION..." - curl -sfLo "$TAR_FILE" \ - "$RELEASES_URL/download/$VERSION/${FILE_BASENAME}_$(uname -s)_$(uname -m).tar.gz" - curl -sfLo "checksums.txt" "$RELEASES_URL/download/$VERSION/checksums.txt" + curl -sfLO "$RELEASES_URL/download/$VERSION/$TAR_FILE.tar.gz" + curl -sfLO "$RELEASES_URL/download/$VERSION/checksums.txt" echo "Verifying checksums..." sha256sum --ignore-missing --quiet --check checksums.txt if command -v cosign >/dev/null 2>&1; then