mnemonic-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [mnemonic] branch master updated: MNEMONIC-583: Detect JAVA_HOME and verify signature in release script
Date Thu, 31 Dec 2020 23:26:49 GMT
This is an automated email from the ASF dual-hosted git repository.

garyw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mnemonic.git


The following commit(s) were added to refs/heads/master by this push:
     new 1471057  MNEMONIC-583: Detect JAVA_HOME and verify signature in release script
1471057 is described below

commit 14710575e0cd8d5f87d0d0b5cade03af184df276
Author: Xiaojin Jiao <xj.jiao@gmail.com>
AuthorDate: Thu Dec 31 13:36:38 2020 -0800

    MNEMONIC-583: Detect JAVA_HOME and verify signature in release script
    
    Signed-off-by: Xiaojin Jiao <xj.jiao@gmail.com>
---
 bin/release.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/bin/release.sh b/bin/release.sh
index f4286f4..964e6ce 100755
--- a/bin/release.sh
+++ b/bin/release.sh
@@ -36,7 +36,7 @@ continueprompt() {
 }
 
 if [ -z "${MNEMONIC_HOME}" ]; then
-  source "$(dirname "$0")/find-mnemonic-home.sh" || { echo "Not found find-mnemonic-home.sh
script."; exit 10; }
+    source "$(dirname "$0")/find-mnemonic-home.sh" || { echo "Not found find-mnemonic-home.sh
script."; exit 10; }
 fi
 pushd "$MNEMONIC_HOME" || { echo "the environment variable \$MNEMONIC_HOME contains invalid
home directory of Mnemonic project."; exit 11; }
 
@@ -51,6 +51,11 @@ RELEASE_CANDIDATE_ID="$3"
 SKIP_TEST_RUN="${4:-no}"
 IS_SAME_VERSION=false
 
+if [ -z ${JAVA_HOME} ]; then
+    JAVA_HOME="$(dirname $(dirname $(readlink -f $(which javac))))"
+    export JAVA_HOME
+fi
+
 echo "You have specified:"
 echo "RELEASE_VERSION = ${RELEASE_VERSION}"
 echo "NEXT_RELEASE_VERSION = ${NEXT_RELEASE_VERSION}"
@@ -61,6 +66,7 @@ if [ "${SKIP_TEST_RUN}" == "no" ]; then
 else
     echo "The test run will be skipped as specified."
 fi
+echo "JAVA_HOME = ${JAVA_HOME}"
 echo "NOTE: Please ensure there are no uncommitted or untracked files in your local workplace/repo.
before continue"
 continueprompt
 
@@ -96,7 +102,6 @@ rm -rf target/
 git clean -xdf
 
 mvn clean prepare-package -DskipTests -Dremoteresources.skip=true &&
-mvn prepare-package -DskipTests -Dremoteresources.skip=true &&
 mvn deploy -DskipTests -Dremoteresources.skip=true -P apache-release || { echo "Preparation
failed"; exit 40; }
 
 RELEASEBASENAME=apache-mnemonic-${RELEASE_VERSION}
@@ -119,6 +124,8 @@ fi
 popd
 rm -rf ${RELEASEBASENAME}/
 
+gpg --verify target/${RELEASESRCPKGFULLNAME}.asc target/${RELEASESRCPKGFULLNAME} || { echo
"The signature of target/${RELEASESRCPKGFULLNAME} is invalid."; exit 120; }
+
 echo "Prepared Artifacts:"
 echo `ls target/${RELEASESRCPKGFULLNAME}`
 echo `ls target/${RELEASESRCPKGFULLNAME}.asc`


Mime
View raw message