fix(build): avoid SIGPIPE in rsync SHA256 verification
Some checks failed
Build CLI with Embedded SQLite / build (arm64, aarch64-linux) (push) Waiting to run
Build CLI with Embedded SQLite / build (x86_64, x86_64-linux) (push) Waiting to run
Build CLI with Embedded SQLite / build-macos (arm64) (push) Waiting to run
Build CLI with Embedded SQLite / build-macos (x86_64) (push) Waiting to run
CI with Native Libraries / Build and Test Native Libraries (push) Blocked by required conditions
CI with Native Libraries / Build Release Libraries (push) Blocked by required conditions
Documentation / build-and-publish (push) Waiting to run
Security Scan / Security Analysis (push) Waiting to run
Security Scan / Native Library Security (push) Waiting to run
Checkout test / test (push) Successful in 5s
CI with Native Libraries / Check Build Environment (push) Successful in 11s
CI/CD Pipeline / Test (push) Failing after 1m3s
CI/CD Pipeline / Dev Compose Smoke Test (push) Has been skipped
CI/CD Pipeline / Build (push) Has been skipped
CI/CD Pipeline / Test Scripts (push) Has been skipped
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build (push) Has been cancelled
Some checks failed
Build CLI with Embedded SQLite / build (arm64, aarch64-linux) (push) Waiting to run
Build CLI with Embedded SQLite / build (x86_64, x86_64-linux) (push) Waiting to run
Build CLI with Embedded SQLite / build-macos (arm64) (push) Waiting to run
Build CLI with Embedded SQLite / build-macos (x86_64) (push) Waiting to run
CI with Native Libraries / Build and Test Native Libraries (push) Blocked by required conditions
CI with Native Libraries / Build Release Libraries (push) Blocked by required conditions
Documentation / build-and-publish (push) Waiting to run
Security Scan / Security Analysis (push) Waiting to run
Security Scan / Native Library Security (push) Waiting to run
Checkout test / test (push) Successful in 5s
CI with Native Libraries / Check Build Environment (push) Successful in 11s
CI/CD Pipeline / Test (push) Failing after 1m3s
CI/CD Pipeline / Dev Compose Smoke Test (push) Has been skipped
CI/CD Pipeline / Build (push) Has been skipped
CI/CD Pipeline / Test Scripts (push) Has been skipped
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build (push) Has been cancelled
Replace echo | sha256sum -c - pipeline with direct comparison Fixes error 141 (SIGPIPE) caused by pipefail with early pipe close
This commit is contained in:
parent
97c066af4f
commit
7bc1c8a982
1 changed files with 6 additions and 5 deletions
|
|
@ -56,12 +56,13 @@ fi
|
|||
if [[ "${verified}" -ne 1 ]]; then
|
||||
if [[ -n "${RSYNC_TARBALL_SHA256}" ]]; then
|
||||
echo "verifying sha256 for ${url}"
|
||||
if command -v sha256sum >/dev/null 2>&1; then
|
||||
echo "${RSYNC_TARBALL_SHA256} ${tmp}/rsync.tar.gz" | sha256sum -c -
|
||||
elif command -v shasum >/dev/null 2>&1; then
|
||||
echo "${RSYNC_TARBALL_SHA256} ${tmp}/rsync.tar.gz" | shasum -a 256 -c -
|
||||
actual_sha256="$(sha256sum "${tmp}/rsync.tar.gz" | cut -d' ' -f1)"
|
||||
if [[ "${actual_sha256}" == "${RSYNC_TARBALL_SHA256}" ]]; then
|
||||
echo "${tmp}/rsync.tar.gz: OK"
|
||||
else
|
||||
echo "build-rsync: need sha256sum or shasum for checksum verification" >&2
|
||||
echo "build-rsync: sha256 mismatch!" >&2
|
||||
echo " expected: ${RSYNC_TARBALL_SHA256}" >&2
|
||||
echo " actual: ${actual_sha256}" >&2
|
||||
exit 2
|
||||
fi
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue