From commits-return-852-archive-asf-public=cust-asf.ponee.io@mnemonic.apache.org Thu Dec 31 23:26:51 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 390CD180638 for ; Fri, 1 Jan 2021 00:26:51 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id AA49064A7B for ; Thu, 31 Dec 2020 23:26:50 +0000 (UTC) Received: (qmail 45528 invoked by uid 500); 31 Dec 2020 23:26:50 -0000 Mailing-List: contact commits-help@mnemonic.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mnemonic.apache.org Delivered-To: mailing list commits@mnemonic.apache.org Received: (qmail 45519 invoked by uid 99); 31 Dec 2020 23:26:50 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2020 23:26:49 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D210281F9F; Thu, 31 Dec 2020 23:26:49 +0000 (UTC) Date: Thu, 31 Dec 2020 23:26:49 +0000 To: "commits@mnemonic.apache.org" Subject: [mnemonic] branch master updated: MNEMONIC-583: Detect JAVA_HOME and verify signature in release script MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <160945720978.17865.8300851662050574962@gitbox.apache.org> From: garyw@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: mnemonic X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: aba3fe9a32c8cda829776610f3f1fead5c65c6cf X-Git-Newrev: 14710575e0cd8d5f87d0d0b5cade03af184df276 X-Git-Rev: 14710575e0cd8d5f87d0d0b5cade03af184df276 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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 --- 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`