fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject [fineract-cn-demo-server] 17/26: Log build failures and provide summary at end of run
Date Mon, 22 Jan 2018 15:49:11 GMT
This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-demo-server.git

commit 75e4edcd82bd2b95e1c7fb0aa731c662086d1c9f
Author: Simon Matthews <simon@dreamstartlabs.com>
AuthorDate: Mon Oct 16 20:38:41 2017 -0700

    Log build failures and provide summary at end of run
---
 scripts/Unix/initial-setup.sh | 46 ++++++++++++++++++++++++++++++++++++-------
 1 file changed, 39 insertions(+), 7 deletions(-)

diff --git a/scripts/Unix/initial-setup.sh b/scripts/Unix/initial-setup.sh
index 75ce49e..eddd89f 100755
--- a/scripts/Unix/initial-setup.sh
+++ b/scripts/Unix/initial-setup.sh
@@ -1,20 +1,26 @@
 #!/bin/bash
 githubAccount=$1
 
+exec 5>&1
 # REM create core folder
 mkdir -p core
 cd core
-
+ERRORS=""
 get_modules() {
   for module in $@
   do
     git clone https://github.com/$githubAccount/$module.git
-    cd $module
+    pushd $module
     git remote add upstream https://github.com/mifosio/$module.git
     # For some reason permission is denied
     chmod +x gradlew
-    ./gradlew publishToMavenLocal
-    cd ..
+    THISBUILD="\nBUILDING $module\n"
+    THISBUILD+=$(./gradlew publishToMavenLocal |& tee >(tail >&5) 
+    	if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
+    if [ $? -ne 0 ]; then 
+        ERRORS+="$THISBUILD\n"
+    fi
+    popd
   done
 }
 
@@ -30,7 +36,12 @@ cd tools
 # REM initialize javamoney
 git clone https://github.com/JavaMoney/javamoney-lib.git
 cd javamoney-lib
-mvn install -Dmaven.test.skip=true
+THISBUILD="\nBUILDING javamoney-lib\n"
+THISBUILD+=$(mvn install -Dmaven.test.skip=true  |& tee >(tail >&5) 
+   if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
+if [ $? -ne 0 ]; then 
+   ERRORS+="$THISBUILD\n"
+fi
 
 cd ..
 
@@ -39,7 +50,13 @@ git clone https://github.com/$githubAccount/crypto.git
 cd crypto
 git remote add upstream https://github.com/mifosio/crypto.git
 chmod +x gradlew
-./gradlew publishToMavenLocal
+THISBUILD="\nBUILDING $module\n"
+THISBUILD+=$(./gradlew publishToMavenLocal |& tee >(tail >&5) 
+    if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
+if [ $? -ne 0 ]; then 
+    ERRORS+="$THISBUILD\n"
+fi
+
 cd ..
 
 # exit tools directory
@@ -58,7 +75,12 @@ git clone https://github.com/$githubAccount/test-accounting-portfolio.git
 cd test-accounting-portfolio
 git remote add upstream https://github.com/mifosio/test-accounting-portfolio.git
 chmod +x gradlew
-./gradlew build
+THISBUILD="\nBUILDING test-accounting-portfolio\n"
+THISBUILD+=$( ./gradlew build |& tee >(tail >&5) 
+   if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
+if [ $? -ne 0 ]; then 
+   ERRORS+="$THISBUILD\n"
+fi
 # exit integration-tests directory
 cd ..
 
@@ -69,3 +91,13 @@ git remote add upstream https://github.com/mifosio/fims-web-app.git
 npm i
 
 cd ..
+
+if [ ! -z "$ERRORS" ] ; then
+	echo "********************"
+	echo "Build errors found:"
+	echo "********************"
+	echo -e "$ERRORS"
+	echo "********************"
+	echo "Build errors found:"
+	echo "********************"
+fi

-- 
To stop receiving notification emails like this one, please contact
myrle@apache.org.

Mime
View raw message