You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2019/11/30 08:03:39 UTC

[hbase] branch HBASE-23337 updated (134a41e -> 87b6f53)

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

busbey pushed a change to branch HBASE-23337
in repository https://gitbox.apache.org/repos/asf/hbase.git.


 discard 134a41e  HBASE-23337 clean up tmp_repo, make sure staged repo gets into email.
     new 87b6f53  HBASE-23337 clean up tmp_repo, make sure staged repo gets into email.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (134a41e)
            \
             N -- N -- N   refs/heads/HBASE-23337 (87b6f53)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dev-support/create-release/release-build.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


[hbase] 01/01: HBASE-23337 clean up tmp_repo, make sure staged repo gets into email.

Posted by bu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

busbey pushed a commit to branch HBASE-23337
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 87b6f53afd93c5ed37a4357892f60a23bb29679a
Author: Sean Busbey <bu...@apache.org>
AuthorDate: Fri Nov 29 23:02:18 2019 -0600

    HBASE-23337 clean up tmp_repo, make sure staged repo gets into email.
---
 dev-support/create-release/release-build.sh | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/dev-support/create-release/release-build.sh b/dev-support/create-release/release-build.sh
index 8c680c2..1146ba1 100755
--- a/dev-support/create-release/release-build.sh
+++ b/dev-support/create-release/release-build.sh
@@ -55,7 +55,13 @@ EOF
 set -e
 
 function cleanup {
-  rm ${tmp_settings} &> /dev/null || true
+  echo "Cleaning up temp settings file." >&2
+  rm "${tmp_settings}" &> /dev/null || true
+  # If REPO was set, then leave things be. Otherwise if we defined a repo clean it out.
+  if [[ -z "${REPO}" ]] && [[ -n "${tmp_repo}" ]]; then
+    echo "Cleaning up temp repo. set REPO to reuse downloads." >&2
+    rm -rf "${tmp_repo}" &> /dev/null || true
+  fi
 }
 
 if [ $# -eq 0 ]; then
@@ -141,7 +147,6 @@ git clean -d -f -x
 cd ..
 
 tmp_repo="${REPO:-`pwd`/$(mktemp -d hbase-repo-XXXXX)}"
-# Reexamine. Not sure this working. Pass as arg? That don't seem to work either!
 tmp_settings="/${tmp_repo}/tmp-settings.xml"
 echo "<settings><servers>" > "$tmp_settings"
 echo "<server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username>" >> "$tmp_settings"
@@ -219,14 +224,18 @@ if [[ "$1" == "publish-release" ]]; then
   # Coerce the requested version
   $MVN versions:set -DnewVersion=$VERSION
   declare -a mvn_goals=(clean install)
+  declare staged_repo_id="dryrun-no-repo"
   if ! is_dry_run; then
     mvn_goals=("${mvn_goals[@]}" deploy)
   fi
   echo "Staging release in nexus"
-  MAVEN_OPTS="${MAVEN_OPTS}" ${MVN} --settings $tmp_settings \
+  if ! MAVEN_OPTS="${MAVEN_OPTS}" ${MVN} --settings $tmp_settings \
       -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES}" \
       -Dmaven.repo.local="${tmp_repo}" \
-      "${mvn_goals[@]}" > "${BASE_DIR}/mvn_deploy.log"
+      "${mvn_goals[@]}" > "${BASE_DIR}/mvn_deploy.log"; then
+    echo "Staging build failed, see 'mvn_deploy.log' for details." >&2
+    exit 1
+  fi
   if ! is_dry_run; then
     staged_repo_id=$(grep -o "Closing staging repository with ID .*" "${BASE_DIR}/mvn_deploy.log" \
         | sed -e 's/Closing staging repository with ID "\([^"]*\)"./\1/')
@@ -234,12 +243,12 @@ if [[ "$1" == "publish-release" ]]; then
   else
     echo "Artifacts successfully built. not staged due to dry run."
   fi
-  )
   # Dump out email to send. Where we find vote.tmpl depends
   # on where this script is run from
   export PROJECT_TEXT=$(echo "${PROJECT}" | sed "s/-/ /g")
-  eval "echo \"$(< ${SELF}/vote.tmpl)\"" |tee vote.txt
+  eval "echo \"$(< ${SELF}/vote.tmpl)\"" |tee "${BASE_DIR}/vote.txt"
   exit 0
+  )
 fi
 
 cd ..