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

zjffdu pushed a commit to branch branch-0.8
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.8 by this push:
     new 85f56cf  [hotfix] Fix release script
85f56cf is described below

commit 85f56cfbd39c9ef53453159bb6bbba489d419ee6
Author: jeffzhang.zjf <jeffzhang....@alibaba-inc.com>
AuthorDate: Thu Jan 24 10:59:09 2019 +0800

    [hotfix] Fix release script
    
    (cherry picked from commit 11335ff35a272321247e5dfcc3afaa9fea189b85)
---
 dev/common_release.sh  |  3 ++-
 dev/create_release.sh  | 10 +---------
 dev/publish_release.sh | 15 ++++++---------
 3 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/dev/common_release.sh b/dev/common_release.sh
index 70afd1d..bc3a03d 100644
--- a/dev/common_release.sh
+++ b/dev/common_release.sh
@@ -31,6 +31,7 @@ if [[ -z "${WORKING_DIR}" ]]; then
   WORKING_DIR="/tmp/zeppelin-release"
 fi
 
+rm -rf "${WORKING_DIR}"
 mkdir "${WORKING_DIR}"
 
 # If set to 'yes', release script will deploy artifacts to SNAPSHOT repository.
@@ -42,7 +43,7 @@ usage() {
   exit 1
 }
 
-function git_clone() { 
+function git_clone() {
   echo "Clone the source"
   # clone source
   git clone https://git-wip-us.apache.org/repos/asf/zeppelin.git 
"${WORKING_DIR}/zeppelin"
diff --git a/dev/create_release.sh b/dev/create_release.sh
index 6836e02..f0529d5 100755
--- a/dev/create_release.sh
+++ b/dev/create_release.sh
@@ -55,11 +55,7 @@ function make_source_package() {
   echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 --armor \
     --output "zeppelin-${RELEASE_VERSION}.tgz.asc" \
     --detach-sig "${WORKING_DIR}/zeppelin-${RELEASE_VERSION}.tgz"
-  echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 \
-    --print-md MD5 "zeppelin-${RELEASE_VERSION}.tgz" > \
-    "${WORKING_DIR}/zeppelin-${RELEASE_VERSION}.tgz.md5"
-  echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 \
-    --print-md SHA512 "zeppelin-${RELEASE_VERSION}.tgz" > \
+  ${SHASUM} -a 512 "zeppelin-${RELEASE_VERSION}.tgz" > \
     "${WORKING_DIR}/zeppelin-${RELEASE_VERSION}.tgz.sha512"
 }
 
@@ -89,15 +85,11 @@ function make_binary_release() {
   echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 --armor \
     --output "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.asc" \
     --detach-sig "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz"
-  echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 --print-md MD5 \
-    "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz" > \
-    "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.md5"
   ${SHASUM} -a 512 "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz" > 
\
     "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.sha512"
 
   mv "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz" 
"${WORKING_DIR}/"
   mv "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.asc" 
"${WORKING_DIR}/"
-  mv "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.md5" 
"${WORKING_DIR}/"
   mv "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.sha512" 
"${WORKING_DIR}/"
 
   # clean up build dir
diff --git a/dev/publish_release.sh b/dev/publish_release.sh
index 8fcd6d3..83db305 100755
--- a/dev/publish_release.sh
+++ b/dev/publish_release.sh
@@ -54,7 +54,6 @@ NEXUS_PROFILE="153446d1ac37c4"
 function cleanup() {
   echo "Remove working directory and maven local repository"
   rm -rf ${WORKING_DIR}
-  rm -rf ${tmp_repo}
 }
 
 function curl_error() {
@@ -126,14 +125,13 @@ function publish_to_maven() {
 
   echo "Created Nexus staging repository: ${staged_repo_id}"
 
-  mkdir /tmp/zeppelin-repo-${RELEASE_VERSION}
-  tmp_repo=/tmp/zeppelin-repo-${RELEASE_VERSION}
+  rm -rf $HOME/.m2/repository/org/apache/zeppelin
 
   # build with scala-2.10
   echo "mvn clean install -DskipTests \
-    -Dmaven.repo.local=${tmp_repo} -Pscala-2.10 -Pbeam \
+    -Pscala-2.10 -Pbeam \
     ${PUBLISH_PROFILES} ${PROJECT_OPTIONS}"
-  mvn clean install -DskipTests -Dmaven.repo.local="${tmp_repo}" -Pscala-2.10 
-Pbeam \
+  mvn clean install -DskipTests -Pscala-2.10 -Pbeam \
     ${PUBLISH_PROFILES} ${PROJECT_OPTIONS}
   if [[ $? -ne 0 ]]; then
     echo "Build with scala 2.10 failed."
@@ -144,23 +142,22 @@ function publish_to_maven() {
   "${BASEDIR}/change_scala_version.sh" 2.11
 
   echo "mvn clean install -DskipTests \
-    -Dmaven.repo.local=${tmp_repo} -Pscala-2.11 \
+    -Pscala-2.11 \
     ${PUBLISH_PROFILES} ${PROJECT_OPTIONS}"
-  mvn clean install -DskipTests -Dmaven.repo.local="${tmp_repo}" -Pscala-2.11 \
+  mvn clean install -DskipTests -Pscala-2.11 \
     ${PUBLISH_PROFILES} ${PROJECT_OPTIONS}
   if [[ $? -ne 0 ]]; then
     echo "Build with scala 2.11 failed."
     exit 1
   fi
 
-  pushd "${tmp_repo}/org/apache/zeppelin"
+  pushd "${HOME}/.m2/repository/org/apache/zeppelin"
   find . -type f | grep -v '\.jar$' | grep -v '\.pom$' |grep -v '\.war$' | 
xargs rm
 
   echo "Creating hash and signature files"
   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"
     ${SHASUM} -a 1 "${file}" | cut -f1 -d' ' > "${file}.sha1"
   done
 

Reply via email to