Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
SUBMARINE-663. Use md5sum command in publish_release.sh
Browse files Browse the repository at this point in the history
### What is this PR for?
md5 could only run on macOS machines.

Add md5sum, so that we could also run on Linux machines

ref: https://github.com/apache/spark/blame/688d016c7acc4b9d96d75b40123be9f40b7b2693/dev/create-release/release-build.sh#L444-L452

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Task

### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-663

### How should this be tested?
https://travis-ci.org/github/pingsutw/hadoop-submarine/builds/737266426

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Kevin Su <pingsutw@gmail.com>

Closes #437 from pingsutw/SUBMARINE-663 and squashes the following commits:

e096699 [Kevin Su] SUBMARINE-663. Use md5sum command in publish_release.sh
  • Loading branch information
pingsutw authored and xunliu committed Oct 20, 2020
1 parent 2ff3339 commit d34b374
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev-support/cicd/publish_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ function publish_to_maven() {
for file in $(find . -type f); do
echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 --output "${file}.asc" \
--detach-sig --armor "${file}"
md5 -q "${file}" > "${file}.md5"
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

Expand Down

0 comments on commit d34b374

Please sign in to comment.