scripts/deploy.sh: generate sha256sum of artifacts (#9669)

pull/1/head
Matthew Peveler 2022-12-26 06:14:49 -05:00 committed by GitHub
parent 81479aab83
commit 312ecf8226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -30,11 +30,13 @@ function upload_assets {
git clone --quiet --depth 1 git@github.com:${SITE_REPO_SLUG}.git "$SITE_HOME"
mv -f "$TLDR_ARCHIVE" "$SITE_HOME/assets/"
cp -f "$TLDRHOME/index.json" "$SITE_HOME/assets/"
# Copy PDF to assets
if [[ -f "${TLDRHOME}/scripts/pdf/tldr-pages.pdf" ]]; then
cp -f "${TLDRHOME}/scripts/pdf/tldr-pages.pdf" "${SITE_HOME}/assets/tldr-book.pdf"
fi
sha256sum \
"${SITE_HOME}/assets/index.json" \
"${SITE_HOME}/assets/${TLDR_ARCHIVE}" \
"${SITE_HOME}/assets/tldr-book.pdf" \
> "${SITE_HOME}/assets/tldr.sha256sums"
cd "$SITE_HOME"
git add -A