Skip to content

Commit

Permalink
Update GR hashes and fix issues in sh file
Browse files Browse the repository at this point in the history
  • Loading branch information
haorldbchi committed Jul 17, 2023
1 parent c91ca68 commit 233ff3a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
29 changes: 21 additions & 8 deletions .github/actions/fetch_bladebit_harvester.sh
Expand Up @@ -24,23 +24,36 @@ fi
## Change this before releasing 2.0.0
artifact_ver="v3.0.0-alpha4"
artifact_base_url="https://github.com/harold-b/bladebit-test/releases/download/v3-alpha4-fixes"
## End changes

linux_sha256=
macos_sha256=
windows_sha256=
linux_arm_sha256="d6f4fc6014a0faa4a5735980a4c12753e205e6429a9d92ea1d32831e475df357"
linux_x86_sha256="98c0efb464935455595d7a573027613c46a7921a95d3f9216b27814f84a1ac31"
macos_arm_sha256="713849aa5d01df9ccfcec259920d86a4ddec83cc3bbc30860852dcf9ac793978"
macos_x86_sha256="67885e4f95b11a115f37138309cc9fd92785229f76adefe6d23e15c45625c92f"
windows_sha256="2a951daa19c65574808537007b874a29d9001bc4387c162633646b0f546676ca"
## End changes

artifact_ext="tar.gz"
sha_bin="sha256sum"
expected_sha256=

if [[ "$OSTYPE" == "darwin"* ]]; then
sha_bin="shasum -a 256"
fi

case "${host_os}" in
linux)
expected_sha256=$linux_sha256
if [[ "${host_arch}" == "arm64" ]]; then
expected_sha256=$linux_arm_sha256
else
expected_sha256=$linux_x86_sha256
fi
;;
macos)
expected_sha256=$macos_sha256
sha_bin="shasum -a 256"
if [[ "${host_arch}" == "arm64" ]]; then
expected_sha256=$macos_arm_sha256
else
expected_sha256=$macos_x86_sha256
fi
;;
windows)
expected_sha256=$windows_sha256
Expand All @@ -58,7 +71,7 @@ curl -L "${artifact_base_url}/green_reaper-${artifact_ver}-${host_os}-${host_arc

# Validate sha256, if one was given
if [ -n "${expected_sha256}" ]; then
gr_sha256="$(${sha_bin} ${artifact_name})"
gr_sha256="$(${sha_bin} ${artifact_name} | cut -d' ' -f1)"

if [[ "${gr_sha256}" != "${expected_sha256}" ]]; then
echo >&2 "GreenReaper SHA256 mismatch!"
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build-wheels.yml
Expand Up @@ -133,7 +133,6 @@ jobs:
run: |
set -eo pipefail
set -x
windows_sha256='febea2317b7e858e296a30344a5382161cebc1a66678975151b117f17cda5181'
.github/actions/fetch_bladebit_harvester.sh windows x86-64
- name: Build and test
Expand All @@ -155,10 +154,8 @@ jobs:
set -eo pipefail
ARCH=$(uname -m)
if [[ $ARCH == x86_64 ]]; then
linux_sha256='ef3f8f74b9c63166a735eb1f2cb855e88b36f50ad52c9d51cf32eb3e9e25428e'
.github/actions/fetch_bladebit_harvester.sh linux x86-64
else
linux_sha256='fcc8bf849733781c82c0b13b70bbba57aaf82abc9a0e2aee7b1ba3da6b0e58f2'
.github/actions/fetch_bladebit_harvester.sh linux arm64
fi
Expand All @@ -171,10 +168,8 @@ jobs:
set -eo pipefail
ARCH=$(uname -m)
if [[ $ARCH == x86_64 ]]; then
macos_sha256='199720c9dff72e883edbd027c31cc03ed9f901e6a00e2be5a7e8ac2633ecb69c'
.github/actions/fetch_bladebit_harvester.sh macos x86-64
else
macos_sha256='932d73c6a70df59bbe7baf3702cc74cc8eb483f5e6a94551b3089779b1e7b010'
.github/actions/fetch_bladebit_harvester.sh macos arm64
fi
Expand Down

0 comments on commit 233ff3a

Please sign in to comment.