1#!/bin/bash 2 3# For a newly pushed branch the BEFORE_SHA will be all 0s 4if [[ ${BASE} == 0000000000000000000000000000000000000000 ]]; then 5 echo "Newly pushed branch, skipped" 6 exit 0 7fi 8 9git merge-base --is-ancestor ${BASE} ${TIP} 10if [[ $? -ne 0 ]]; then 11 echo "${TIP} is not a descendent of ${BASE}, skipped" 12 exit 0 13fi 14 15echo "Building ${BASE}..${TIP}" 16 17NON_SYMBOLIC_REF=1 ./automation/scripts/build-test.sh ${BASE} ${TIP} \ 18 bash -c "git clean -ffdx && ./automation/scripts/build" 19