You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2019/10/14 05:09:11 UTC

[incubator-iotdb] branch tooling-for-release updated: fix release tools

This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch tooling-for-release
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/tooling-for-release by this push:
     new da4e310  fix release tools
da4e310 is described below

commit da4e310d3682899bdd3635e0f1eb473b8adab35b
Author: Lei Rui <10...@qq.com>
AuthorDate: Mon Sep 30 09:16:22 2019 +0800

    fix release tools
---
 tools/check_sigs.sh              |  4 ++--
 tools/common.sh                  | 18 +++++++++---------
 tools/download_staged_release.sh |  8 +++++---
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/tools/check_sigs.sh b/tools/check_sigs.sh
index 3cd874c..6bf03a9 100755
--- a/tools/check_sigs.sh
+++ b/tools/check_sigs.sh
@@ -54,7 +54,7 @@ function checkFile() {
        echo "${FILE} SHA OK";
     fi
 
-    gpg --verify "${FILE}.asc"
+    gpg --verify "${FILE}.asc" "${FILE}"
 
 }
 
@@ -64,4 +64,4 @@ do
 done
 
 echo
-echo "SUCCESS: all checksum and signature files OK"
+echo "SUCCESS: all checksum and signature files OK"
\ No newline at end of file
diff --git a/tools/common.sh b/tools/common.sh
index cd64a0d..98293ef 100755
--- a/tools/common.sh
+++ b/tools/common.sh
@@ -28,7 +28,7 @@ BUNDLE_DIR=${IOTDB_ROOT_DIR}/target/checkout/target
 IOTDB_ASF_GIT_URL=https://git-wip-us.apache.org/repos/asf/incubator-iotdb.git
 IOTDB_ASF_DIST_URL=https://www.apache.org/dist/incubator/iotdb
 IOTDB_ASF_DIST_DYN_URL=https://www.apache.org/dyn/closer.cgi/iotdb
-IOTDB_ASF_SVN_RELEASE_URL=https://dist.apache.org/repos/dist/release/iotdb
+IOTDB_ASF_SVN_RELEASE_URL=https://dist.apache.org/repos/dist/release/incubator/iotdb
 IOTDB_ASF_SVN_RC_URL=https://dist.apache.org/repos/dist/dev/incubator/iotdb
 
 USAGE=
@@ -66,13 +66,13 @@ function noExtraArgs() { # usage: noExtraArgs "$@"
   [ $# = 0 ] || usage "extra arguments"
 }
 
-function getAbsPath() { # $1: rel-or-abs-path 
+function getAbsPath() { # $1: rel-or-abs-path
     echo "$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
 }
 
 function confirm () {  # [$1: question]
   while true; do
-    # call with a prompt string or use a default                                                                                                                                                   
+    # call with a prompt string or use a default
     /bin/echo -n "${1:-Are you sure?}"
     read -r -p " [y/n] " response
     case $response in
@@ -99,7 +99,7 @@ function checkUsingMgmtCloneWarn() { # no args; warns if iotdb root isn't a mgmt
     return 1
   else
     return 0
-  fi 
+  fi
 }
 
 function checkBundleDir() { # no args  returns true/false (0/1)
@@ -112,9 +112,9 @@ function checkBundleDir() { # no args  returns true/false (0/1)
 
 function checkVerNum() {  #  $1: X.Y.Z  returns true/false (0/1)
   if [ `echo $1 | grep -o -E '^\d+\.\d+\.\d+$'` ]; then
-    return 0
-  else
     return 1
+  else
+    return 0
   fi
 }
 
@@ -124,9 +124,9 @@ function checkVerNumDie() { #  $1: X.Y.Z  dies if not ok
 
 function checkRcNum() {  # $1: rc-num   returns true/false (0/1)
   if [ `echo $1 | grep -o -E '^\d+$'` ] && [ $1 != 0 ]; then
-    return 0
-  else
     return 1
+  else
+    return 0
   fi
 }
 
@@ -199,4 +199,4 @@ function getReleaseTagComment() {  # $1: X.Y.Z  [$2: rc-num]
     RC_SFX=" RC$1"
   fi
   echo "Apache IOTDB ${VER}${RC_SFX}"
-}
+}
\ No newline at end of file
diff --git a/tools/download_staged_release.sh b/tools/download_staged_release.sh
index 7b55749..eee2265 100755
--- a/tools/download_staged_release.sh
+++ b/tools/download_staged_release.sh
@@ -133,9 +133,11 @@ cd ${ABS_BASE_DIR}
 echo
 echo "If the following bundle gpg signature checks fail, you may need to"
 echo "import the project's list of signing keys to your keyring"
-echo "    $ gpg ${DST_BASE_DIR}/KEYS            # show the included keys"
-echo "    $ gpg --import ${DST_BASE_DIR}/KEYS"
+echo "    $ gpg ${BUILDTOOLS_DIR}/${DST_BASE_DIR}/KEYS            # show the included keys"
+echo "    $ gpg --import ${BUILDTOOLS_DIR}/${DST_BASE_DIR}/KEYS"
+gpg ${BUILDTOOLS_DIR}/${DST_BASE_DIR}/KEYS
+gpg --import ${BUILDTOOLS_DIR}/${DST_BASE_DIR}/KEYS
 
 echo
 echo "Verifying the source bundle signatures..."
-(set -x; $BUILDTOOLS_DIR/check_sigs.sh ${DST_VER_DIR})
+(set -x; bash $BUILDTOOLS_DIR/check_sigs.sh ${BUILDTOOLS_DIR}/${DST_BASE_DIR}/${DST_VER_DIR})
\ No newline at end of file