You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by aw...@apache.org on 2019/11/19 19:30:36 UTC

[kudu] 02/02: [mini-cluster] another fix on building mini-cluster JAR

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

awong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 93ba778a7e72cbc55a706f7d61d5ee1cd2721c56
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Fri Nov 15 22:43:59 2019 -0800

    [mini-cluster] another fix on building mini-cluster JAR
    
    Check whether the build directory exists prior moving it.
    
    This is a follow-up to 6406123924c3900e8edd65eebbb3d93963fd2a7b.
    
    Change-Id: I26b531e3fcb250adeecbbaa9aa12858a4066ada2
    Reviewed-on: http://gerrit.cloudera.org:8080/14730
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
 build-support/mini-cluster/build_mini_cluster_binaries.sh | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/build-support/mini-cluster/build_mini_cluster_binaries.sh b/build-support/mini-cluster/build_mini_cluster_binaries.sh
index 1d0a434..da8d630 100755
--- a/build-support/mini-cluster/build_mini_cluster_binaries.sh
+++ b/build-support/mini-cluster/build_mini_cluster_binaries.sh
@@ -74,12 +74,14 @@ TARGETS="kudu kudu-tserver kudu-master"
 
 # Remove leftovers from previous releases/builds: rename the existing directory.
 # To skip this step, set the MINI_CLUSTER_NO_FRESH_BUILD environment variable.
-if [ -n "$MINI_CLUSTER_NO_FRESH_BUILD" ]; then
-  echo "WARNING: using existing build directory"
-else
-  suffix=$(date "+%Y%m%d.%H%M%S")
-  echo "Moving existing $BUILD_ROOT into $BUILD_ROOT.$suffix"
-  mv $BUILD_ROOT $BUILD_ROOT.$suffix
+if [ -d "$BUILD_ROOT" ]; then
+  if [ -n "$MINI_CLUSTER_NO_FRESH_BUILD" ]; then
+    echo "WARNING: using existing build directory"
+  else
+    suffix=$(date "+%Y%m%d.%H%M%S")
+    echo "Moving existing $BUILD_ROOT into $BUILD_ROOT.$suffix"
+    mv $BUILD_ROOT $BUILD_ROOT.$suffix
+  fi
 fi
 
 cd $SOURCE_ROOT