Also pull submodules and add autobuild support 65/10265/1
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 19 Jul 2017 11:44:02 +0000 (13:44 +0200)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 19 Jul 2017 11:44:08 +0000 (13:44 +0200)
Enable automatically pulling the submodules when cloning and
use the autobuild script if present.

Change-Id: Ib5641cb8d8c3c849c2c9bbcdacd287e9d01b6805
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/common/include-apps-build-app.sh
jjb/common/include-apps-rsync-download-changeid.sh

index f46c7f8..ec79d84 100644 (file)
@@ -46,7 +46,7 @@ if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "apps/"); t
 
     # clone git
     rm -rf ${MYPROJECT}
-    git clone https://${GERRIT_HOST}/gerrit/${GERRIT_PROJECT}.git
+    git clone --recursive https://${GERRIT_HOST}/gerrit/${GERRIT_PROJECT}.git
     pushd ${MYPROJECT}
         git log -1 --pretty=oneline
         if test x"" != x"${TARGETREFSPEC}" ; then
@@ -66,14 +66,22 @@ if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "apps/"); t
         git log -1 --pretty=oneline
 
         # Fixme: use aglbuild script
-        if test -f Makefile ; then
-          make
-          make package
+        export DONE=false
+        if test ! $DONE -a -f conf.d/autobuild/agl/autobuild ; then
+            mkdir -p $(pwd)/package/
+            conf.d/autobuild/agl/autobuild package DEST=$(pwd)/package/
+            export DONE=true
         fi
-        if test -f ${MYPROJECT}.pro; then
-          qmake
-          make
-          make package
+        if test ! $DONE -a -f Makefile ; then
+            make
+            make package
+            export DONE=true
+        fi
+        if test ! $DONE -a -f ${MYPROJECT}.pro; then
+            qmake
+            make
+            make package
+            export DONE=true
         fi
     popd
 
index d6e9f8a..939496d 100644 (file)
@@ -3,9 +3,9 @@
 #set -x
 set -e
 
-echo "\n\n\n"
+echo -e "\n\n\n"
 echo "#########################################"
-echo "\n\n\n"
+echo -e "\n\n\n"
 
 
 export RSYNCDST="/srv/download/AGL/upload/ci/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}"