Skip to content

Commit

Permalink
SPARK-5308 [BUILD] MD5 / SHA1 hash format doesn't match standard Mave…
Browse files Browse the repository at this point in the history
…n output

Here's one way to make the hashes match what Maven's plugins would create. It takes a little extra footwork since OS X doesn't have the same command line tools. An alternative is just to make Maven output these of course - would that be better? I ask in case there is a reason I'm missing, like, we need to hash files that Maven doesn't build.

Author: Sean Owen <[email protected]>

Closes apache#4161 from srowen/SPARK-5308 and squashes the following commits:

70d09d0 [Sean Owen] Use $(...) syntax
e25eff8 [Sean Owen] Generate MD5, SHA1 hashes in a format like Maven's plugin
  • Loading branch information
srowen authored and pwendell committed Jan 27, 2015
1 parent 9142674 commit ff356e2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dev/create-release/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,14 @@ if [[ ! "$@" =~ --package-only ]]; then
for file in $(find . -type f)
do
echo $GPG_PASSPHRASE | gpg --passphrase-fd 0 --output $file.asc --detach-sig --armour $file;
gpg --print-md MD5 $file > $file.md5;
gpg --print-md SHA1 $file > $file.sha1
if [ $(command -v md5) ]; then
# Available on OS X; -q to keep only hash
md5 -q $file > $file.md5
else
# Available on Linux; cut to keep only hash
md5sum $file | cut -f1 -d' ' > $file.md5
fi
shasum -a 1 $file | cut -f1 -d' ' > $file.sha1
done

nexus_upload=$NEXUS_ROOT/deployByRepositoryId/$staged_repo_id
Expand Down

0 comments on commit ff356e2

Please sign in to comment.