3
0
mirror of https://github.com/Qortal/qortal.git synced 2025-02-11 17:55:50 +00:00

Fixes to allow publish-auto-update.sh to work with sha256sum versions that add trailing characters.

This commit is contained in:
CalDescent 2021-03-21 18:15:29 +00:00
parent 503d22e4d0
commit 30160e2843

View File

@ -57,9 +57,10 @@ $timestamp *= 1000; # Convert to milliseconds
# locate sha256 utility
my $SHA256 = `which sha256sum || which sha256`;
chomp $SHA256;
# SHA256 of actual update file
my $sha256 = `git show auto-update-${commit_hash}:${project}.update | ${SHA256}`;
my $sha256 = `git show auto-update-${commit_hash}:${project}.update | ${SHA256} | head -c 64`;
die("Can't calculate SHA256 of ${project}.update\n") unless $sha256 =~ m/(\S{64})/;
chomp $sha256;