diff --git a/linux-amd64.Dockerfile b/linux-amd64.Dockerfile index 7cdc000e4..f093c2ea1 100644 --- a/linux-amd64.Dockerfile +++ b/linux-amd64.Dockerfile @@ -10,10 +10,10 @@ RUN apk add --no-cache ffmpeg python3 py3-requests sqlite-libs ARG VERSION RUN curl -fsSL "https://github.com/stashapp/stash/releases/download/latest_develop/CHECKSUMS_SHA1" > "${APP_DIR}/CHECKSUMS_SHA1" && \ - cat "${APP_DIR}/CHECKSUMS_SHA1" | grep "${VERSION:0:7}" && \ + grep "${VERSION:0:7}" < "${APP_DIR}/CHECKSUMS_SHA1" && \ curl -fsSL "https://github.com/stashapp/stash/releases/download/latest_develop/stash-linux" > "${APP_DIR}/stash" && \ CHECKSUM=$(sha1sum "${APP_DIR}/stash" | awk '{print $1}') && \ - cat "${APP_DIR}/CHECKSUMS_SHA1" | grep "${CHECKSUM}" && \ + grep "${CHECKSUM}" < "${APP_DIR}/CHECKSUMS_SHA1" && \ chmod 755 "${APP_DIR}/stash" COPY root/ / diff --git a/linux-arm64.Dockerfile b/linux-arm64.Dockerfile index 6a9463c19..e45a5bc72 100644 --- a/linux-arm64.Dockerfile +++ b/linux-arm64.Dockerfile @@ -10,10 +10,10 @@ RUN apk add --no-cache ffmpeg python3 py3-requests sqlite-libs ARG VERSION RUN curl -fsSL "https://github.com/stashapp/stash/releases/download/latest_develop/CHECKSUMS_SHA1" > "${APP_DIR}/CHECKSUMS_SHA1" && \ - cat "${APP_DIR}/CHECKSUMS_SHA1" | grep "${VERSION:0:7}" && \ + grep "${VERSION:0:7}" < "${APP_DIR}/CHECKSUMS_SHA1" && \ curl -fsSL "https://github.com/stashapp/stash/releases/download/latest_develop/stash-linux-arm64v8" > "${APP_DIR}/stash" && \ CHECKSUM=$(sha1sum "${APP_DIR}/stash" | awk '{print $1}') && \ - cat "${APP_DIR}/CHECKSUMS_SHA1" | grep "${CHECKSUM}" && \ + grep "${CHECKSUM}" < "${APP_DIR}/CHECKSUMS_SHA1" && \ chmod 755 "${APP_DIR}/stash" COPY root/ / diff --git a/update-versions.sh b/update-versions.sh index 85f56f8dc..13a6b977d 100644 --- a/update-versions.sh +++ b/update-versions.sh @@ -2,10 +2,10 @@ version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://api.github.com/repos/stashapp/stash/releases/tags/latest_develop" | jq -re .target_commitish) || exit 1 [[ ${version} == "develop" ]] && version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://api.github.com/repos/stashapp/stash/commits/develop" | jq -re .sha) || exit 1 curl -fsSL "https://github.com/stashapp/stash/releases/download/latest_develop/CHECKSUMS_SHA1" -o CHECKSUMS_SHA1 || exit 1 -grep -q "${version:0:7}" < CHECKSUMS_SHA1 +grep -q "${version:0:7}" < CHECKSUMS_SHA1 || exit 1 curl -fsSL "https://github.com/stashapp/stash/releases/download/latest_develop/stash-linux" -o stash || exit 1 checksum="$(sha1sum stash | awk '{print $1}')" -grep -q "${checksum}" < CHECKSUMS_SHA1 +grep -q "${checksum}" < CHECKSUMS_SHA1 || exit 1 rm -rf CHECKSUMS_SHA1 stash json=$(cat VERSION.json) jq --sort-keys \