Skip to content

Commit

Permalink
tweak version check [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhotio committed Feb 12, 2024
1 parent 8cca2a4 commit a07e501
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions linux-amd64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/ /
4 changes: 2 additions & 2 deletions linux-arm64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/ /
4 changes: 2 additions & 2 deletions update-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit a07e501

Please sign in to comment.