This is an automated email from the ASF dual-hosted git repository.
liuxun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new d34b374 SUBMARINE-663. Use md5sum command in publish_release.sh
d34b374 is described below
commit d34b374bee4c035c7550aebe5fffb3eeff882e9b
Author: Kevin Su <[email protected]>
AuthorDate: Tue Oct 20 09:37:05 2020 +0800
SUBMARINE-663. Use md5sum command in publish_release.sh
### 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 <[email protected]>
Closes #437 from pingsutw/SUBMARINE-663 and squashes the following commits:
e096699 [Kevin Su] SUBMARINE-663. Use md5sum command in publish_release.sh
---
dev-support/cicd/publish_release.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dev-support/cicd/publish_release.sh
b/dev-support/cicd/publish_release.sh
index 91f6852..ac620f1 100755
--- a/dev-support/cicd/publish_release.sh
+++ b/dev-support/cicd/publish_release.sh
@@ -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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]