File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 6
6
set -euo pipefail
7
7
IFS=$' \n\t '
8
8
9
+ git fetch " https://github.com/$GITHUB_REPOSITORY " " $GITHUB_BASE_REF "
10
+ BASE_COMMIT=" $( git merge-base FETCH_HEAD HEAD) "
11
+
12
+ echo " Searching for toolstate changes between $BASE_COMMIT and $( git rev-parse HEAD) "
9
13
source " $( cd " $( dirname " $0 " ) " && pwd) /../shared.sh"
10
14
11
15
if [[ -z " ${CI_ONLY_WHEN_SUBMODULES_CHANGED+x} " ]]; then
12
16
echo " Executing the job since there is no skip rule in effect"
13
- elif git diff HEAD^ | grep --quiet " ^index .* 160000" ; then
17
+ elif git diff " $BASE_COMMIT " | grep --quiet " ^index .* 160000" ; then
14
18
# Submodules pseudo-files inside git have the 160000 permissions, so when
15
19
# those files are present in the diff a submodule was updated.
16
20
echo " Executing the job since submodules are updated"
17
- elif git diff --name-only HEAD^ | grep --quiet src/tools/' \(clippy\|rustfmt\)' ; then
21
+ elif git diff --name-only " $BASE_COMMIT " | grep --quiet src/tools/' \(clippy\|rustfmt\)' ; then
18
22
# There is not an easy blanket search for subtrees. For now, manually list
19
23
# clippy.
20
24
echo " Executing the job since clippy or rustfmt subtree was updated"
You can’t perform that action at this time.
0 commit comments