From c480c943b2ae5af901d0db726ef56dfbedc97d75 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Thu, 22 Feb 2024 11:21:25 +0100 Subject: [PATCH] ci(linux): calcutate checksums for reh [skip ci] --- package_linux_reh.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/package_linux_reh.sh b/package_linux_reh.sh index 6c2fb30..a082215 100755 --- a/package_linux_reh.sh +++ b/package_linux_reh.sh @@ -58,3 +58,23 @@ echo "Building and moving REH" cd "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" tar czf "../assets/${APP_NAME_LC}-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" . cd .. + +npm install -g checksum + +sum_file() { + if [[ -f "${1}" ]]; then + echo "Calculating checksum for ${1}" + checksum -a sha256 "${1}" > "${1}".sha256 + checksum "${1}" > "${1}".sha1 + fi +} + +cd assets + +for FILE in *; do + if [[ -f "${FILE}" ]]; then + sum_file "${FILE}" + fi +done + +cd ..