CI: Use .gitreview to default BRANCH_NAME.
authorCorey Farrell <git@cfware.com>
Wed, 12 Sep 2018 17:39:23 +0000 (13:39 -0400)
committerCorey Farrell <git@cfware.com>
Wed, 12 Sep 2018 17:39:23 +0000 (13:39 -0400)
This ensures that binary modules are avoided in the master branch even
if BRANCH_NAME is not set.

Change-Id: I79162d2063f22fa9d6b31fde4827ace2dd5bf0da

tests/CI/buildAsterisk.sh

index 992dc94..b974629 100755 (executable)
@@ -6,6 +6,10 @@ REF_DEBUG=0
 DISABLE_BINARY_MODULES=0
 source $CIDIR/ci.functions
 
+if [ -z $BRANCH_NAME ]; then
+       BRANCH_NAME=$(git config -f .gitreview --get gerrit.defaultbranch)
+fi
+
 gen_cats() {
        set +x
        action=$1