diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-05-23 20:34:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2017-05-23 20:34:19 +0000 |
commit | 3d471af83b3b40c729a773067800a573676fdabd (patch) | |
tree | 8c60e4be8fc601bf77767a496d6f9f526e143c0d /jjb/common | |
parent | 0d037623063fac86eede997073e7f7badfac0597 (diff) | |
parent | c1932f90a0cd90db32708445bb947cefdac49f23 (diff) |
Merge "Extend app build train"
Diffstat (limited to 'jjb/common')
-rw-r--r-- | jjb/common/include-apps-build-app.sh | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/jjb/common/include-apps-build-app.sh b/jjb/common/include-apps-build-app.sh new file mode 100644 index 00000000..01d765d0 --- /dev/null +++ b/jjb/common/include-apps-build-app.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de +# License GPLv2 +# +# debugging purposes +set -e + +################################################################################ +# build the app +################################################################################ + +# fallback +if test -z "${GERRIT_PROJECT}"; then + export GERRIT_PROJECT="apps/controls" +fi +if test -z "${GERRIT_BRANCH}"; then + export GERRIT_BRANCH="master" +fi +if test -z "${GERRIT_REFSPEC}"; then + export GERRIT_REFSPEC="refs/tags/dab_3.99.1" +fi +if test -z "${GERRIT_HOST}"; then + export GERRIT_HOST="gerrit.automotivelinux.org" +fi + +# apply GERRIT_* +if test -n "${GERRIT_PROJECT}"; then + export TARGETPROJECT="${GERRIT_PROJECT}" +fi +if test -n "${GERRIT_BRANCH}"; then + export TARGETBRANCH="${GERRIT_BRANCH}" +fi +if test -n "${GERRIT_REFSPEC}"; then + export TARGETREFSPEC="${GERRIT_REFSPEC}" +fi + + + +HANDLED="no" + +# Projects in apps/* +################### +if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^apps/"); then + + MYPROJECT=`echo $TARGETPROJECT | sed -e "s#apps/##g"` + + # clone git + rm -rf ${MYPROJECT} + + git clone https://${GERRIT_HOST}/gerrit/${GERRIT_PROJECT}.git + pushd ${MYPROJECT} + git log -1 + git reset --hard ${GERRIT_REFSPEC} + git log -1 + if test -f Makefile ; then + make + make package + fi + if test -f ${MYPROJECT}.pro; then + qmake + make + make package + fi + popd + + HANDLED="yes" +fi |