scripts: use shasum instead of sha256sum

Because the sha256sum binary isn't available on MacOS we instead use the
shasum -a 256 command that was used before.
This commit is contained in:
Oliver Gugger 2021-02-12 10:35:28 +01:00
parent 4a96c2e55a
commit 644424296b
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
2 changed files with 4 additions and 4 deletions

@ -183,7 +183,7 @@ function build_release() {
# Add the hashes for the individual binaries as well for easy verification # Add the hashes for the individual binaries as well for easy verification
# of a single installed binary. # of a single installed binary.
sha256sum "${dir}/"* >> "manifest-$tag.txt" shasum -a 256 "${dir}/"* >> "manifest-$tag.txt"
if [[ $os == "windows" ]]; then if [[ $os == "windows" ]]; then
reproducible_zip "${dir}" reproducible_zip "${dir}"
@ -193,7 +193,7 @@ function build_release() {
done done
# Add the hash of the packages too, then sort by the second column (name). # Add the hash of the packages too, then sort by the second column (name).
sha256sum lnd-* vendor* >> "manifest-$tag.txt" shasum -a 256 lnd-* vendor* >> "manifest-$tag.txt"
LC_ALL=C sort -k2 -o "manifest-$tag.txt" "manifest-$tag.txt" LC_ALL=C sort -k2 -o "manifest-$tag.txt" "manifest-$tag.txt"
cat "manifest-$tag.txt" cat "manifest-$tag.txt"
} }

@ -63,8 +63,8 @@ check_command gpg
LND_VERSION=$($LND_BIN --version | cut -d'=' -f2) LND_VERSION=$($LND_BIN --version | cut -d'=' -f2)
LNCLI_VERSION=$($LNCLI_BIN --version | cut -d'=' -f2) LNCLI_VERSION=$($LNCLI_BIN --version | cut -d'=' -f2)
LND_SUM=$(sha256sum $LND_BIN | cut -d' ' -f1) LND_SUM=$(shasum -a 256 $LND_BIN | cut -d' ' -f1)
LNCLI_SUM=$(sha256sum $LNCLI_BIN | cut -d' ' -f1) LNCLI_SUM=$(shasum -a 256 $LNCLI_BIN | cut -d' ' -f1)
echo "Detected lnd $LND_BIN version $LND_VERSION with SHA256 sum $LND_SUM" echo "Detected lnd $LND_BIN version $LND_VERSION with SHA256 sum $LND_SUM"
echo "Detected lncli $LNCLI_BIN version $LNCLI_VERSION with SHA256 sum $LNCLI_SUM" echo "Detected lncli $LNCLI_BIN version $LNCLI_VERSION with SHA256 sum $LNCLI_SUM"