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