A few more fixes for run-build-packages-python-and-ruby.sh, and a small
authorWard Vandewege <ward@curoverse.com>
Fri, 1 Apr 2016 14:59:46 +0000 (10:59 -0400)
committerWard Vandewege <ward@curoverse.com>
Fri, 1 Apr 2016 15:00:28 +0000 (11:00 -0400)
safeguard for run-build-packages.sh.

refs #8864

build/run-build-packages-python-and-ruby.sh
build/run-build-packages.sh

index 8d593ac3c7e6d8d4035d30ee2cc3f298f89084a8..e7981e59672c3e62d28000d9e2a0c308e178d598 100755 (executable)
@@ -23,12 +23,10 @@ WORKSPACE=path         Path to the Arvados source tree to build packages from
 
 EOF
 
-EXITCODE=0
-
 exit_cleanly() {
     trap - INT
     report_outcomes
-    exit $EXITCODE
+    exit ${#failures[@]}
 }
 
 gem_wrapper() {
@@ -53,6 +51,9 @@ python_wrapper() {
   timer_reset
 
   cd "$package_directory"
+  if [[ $DEBUG > 0 ]]; then
+    echo `pwd`
+  fi
   handle_python_package
 
   checkexit $? "$package_name python package build"
@@ -140,6 +141,7 @@ fi
 chmod o+r "$WORKSPACE" -R
 
 # More cleanup - make sure all executables that we'll package are 755
+cd "$WORKSPACE"
 find -type d -name 'bin' |xargs -I {} find {} -type f |xargs -I {} chmod 755 {}
 
 # Now fix our umask to something better suited to building and publishing
@@ -148,8 +150,6 @@ umask 0022
 
 debug_echo "umask is" `umask`
 
-FPM_GEM_PREFIX=$($GEM environment gemdir)
-
 gem_wrapper arvados "$WORKSPACE/sdk/ruby"
 gem_wrapper arvados-cli "$WORKSPACE/sdk/cli"
 gem_wrapper arvados-login-sync "$WORKSPACE/services/login-sync"
@@ -171,6 +171,11 @@ if [ $((${#failures[@]} - $GEM_BUILD_FAILURES)) -ne 0 ]; then
 fi
 
 if [[ "$UPLOAD" != 0 ]]; then
+
+  if [[ ! -e "$WORKSPACE/packages" ]]; then
+    mkdir -p "$WORKSPACE/packages"
+  fi
+
   title "Start upload python packages"
   timer_reset
 
index fd18b392363c47f0e17135c4d767261092559117..0db324dc54212c5c44f02cd12a9104b144b180b9 100755 (executable)
@@ -205,6 +205,7 @@ fi
 chmod o+r "$WORKSPACE" -R
 
 # More cleanup - make sure all executables that we'll package are 755
+cd "$WORKSPACE"
 find -type d -name 'bin' |xargs -I {} find {} -type f |xargs -I {} chmod 755 {}
 
 # Now fix our umask to something better suited to building and publishing