Skip to content

Commit

Permalink
build(windows): calculate checksums after signing [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Oct 13, 2024
1 parent e5d9fa5 commit a6cd884
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/insider-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ jobs:
output-artifact-directory: assets/
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')

- name: Prepare checksums
run: ./prepare_checksums.sh
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
Expand Down
24 changes: 3 additions & 21 deletions prepare_assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ set -e

APP_NAME_LC="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )"

. ./utils.sh

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
}

mkdir -p assets

if [[ "${OS_NAME}" == "osx" ]]; then
Expand Down Expand Up @@ -226,12 +214,6 @@ if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
cd ..
fi

cd assets

for FILE in *; do
if [[ -f "${FILE}" ]]; then
sum_file "${FILE}"
fi
done

cd ..
if [[ "${OS_NAME}" != "windows" ]]; then
./prepare_checksums.sh
fi
23 changes: 23 additions & 0 deletions prepare_checksums.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -e

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 ..

0 comments on commit a6cd884

Please sign in to comment.