Skip to content

Commit

Permalink
build(build-docker): use shasum first, then sha256sum
Browse files Browse the repository at this point in the history
macOS recently introduced sha256sum command which can not read
from stdin if "-c" option is provided

using shasum first fixes this issue

[no changelog]
  • Loading branch information
prusnak committed Jan 10, 2025
1 parent 862c987 commit 7a72452
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ else
fi

# check alpine checksum
if command -v sha256sum &> /dev/null ; then
echo "${ALPINE_CHECKSUM} ci/${ALPINE_TARBALL}" | sha256sum -c
else
if command -v shasum &> /dev/null ; then
echo "${ALPINE_CHECKSUM} ci/${ALPINE_TARBALL}" | shasum -a 256 -c
else
echo "${ALPINE_CHECKSUM} ci/${ALPINE_TARBALL}" | sha256sum -c
fi

tag_clean="${TAG//[^a-zA-Z0-9]/_}"
Expand Down

0 comments on commit 7a72452

Please sign in to comment.