File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2- set -e
2+ set -eu
33
44echo " "
55echo " RAVEN: $RAVEN "
66
7- # Does any of the commits in a PR contain "[force ci]" string?
8- COMMITS=$( git --no-pager log master.. --no-merges --format=%s)
7+ # Find the latest commit that is present in master and the branch we test
8+ MASTER_TMP=master-latest-tmp
9+ git fetch origin master:${MASTER_TMP}
10+ MERGE_BASE=$( git merge-base ${MASTER_TMP} ${TRAVIS_BRANCH:- master} )
11+
12+ # Does any of the new commits contain "[force ci]" string?
13+ COMMITS=$( git --no-pager log ${MERGE_BASE} .. --no-merges --format=%s)
914if [[ -n " $( grep ' \[force ci\]' <<< " $COMMITS" ) " ]]; then
1015 HAS_FORCE_COMMIT=true
1116else
1621echo " HAS_FORCE_COMMIT: $HAS_FORCE_COMMIT "
1722
1823# Does any changed file lives in raven-js/raven-node directory?
19- CHANGES=$( git --no-pager diff --name-only master )
24+ CHANGES=$( git --no-pager diff --name-only ${MERGE_BASE} )
2025if [[ -n " $( grep " $RAVEN " <<< " $CHANGES" ) " ]]; then
2126 HAS_CHANGES=true
2227else
You can’t perform that action at this time.
0 commit comments