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 e526830  MNEMONIC-590: Verify git remote URI of upstream in release .sh
e526830 is described below

commit e5268309898e2a59066c76f90ab05e8c03ae614a
Author: Chunyong He <[email protected]>
AuthorDate: Sun Jan 10 20:44:03 2021 -0800

    MNEMONIC-590: Verify git remote URI of upstream in release .sh
    
    Signed-off-by: Chunyong He <[email protected]>
---
 bin/release.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/bin/release.sh b/bin/release.sh
index 196a149..3c000c6 100755
--- a/bin/release.sh
+++ b/bin/release.sh
@@ -115,6 +115,13 @@ if [ -z "${MNEMONIC_HOME}" ]; then
 fi
 pushd "$MNEMONIC_HOME" || { echo "the environment variable \$MNEMONIC_HOME 
contains invalid home directory of Mnemonic project."; exit 11; }
 
+if git remote get-url --push upstream | grep -q "apache/mnemonic"; then
+    echo "Upstream push URL: $(git remote get-url --push upstream)"
+else
+    echo "Upstream push URL is not set correctly, please find one in 
https://github.com/apache/mnemonic";
+    exit 25;
+fi
+
 [[ -n "$(git status --porcelain)" ]] &&
     echo "please commit all changes first." && exit 20
 
@@ -187,7 +194,7 @@ if [ ${RELEASE_COMMAND} == "bump" ]; then
     else
         echo "Cannot find the revision of tag ${CANDIDATE_TAG_NAME}."; exit 
230;
     fi
-    git tag -s ${RELEASE_TAG_NAME} -m "A release candidate 
${RELEASE_TAG_NAME}" ${REVISION_ID} ||
+    git tag -s ${RELEASE_TAG_NAME} -m "A release ${RELEASE_TAG_NAME}" 
${REVISION_ID} ||
         { echo "Tagging with signing failed"; exit 240; }
 
     echo "Push the effective release and bump version to upstream."

Reply via email to