File tree 2 files changed +4
-8
lines changed 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,13 @@ build:
19
19
# https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
20
20
#
21
21
# Cancel building pull requests when there aren't changed in the docs directory.
22
- # `--quiet` exits with a 1 when there **are** changes,
23
- # so we invert the logic with a !
24
22
#
25
- # If there are no changes (exit 0) we force the command to return with 183.
23
+ # If there are no changes (git diff exits with 0) we force the command to return with 183.
26
24
# This is a special exit code on Read the Docs that will cancel the build immediately.
27
25
- |
28
26
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ];
29
27
then
30
- ! git diff --quiet origin/main -- docs/ && exit 183;
28
+ git diff --quiet origin/main -- docs/ && exit 183;
31
29
fi
32
30
33
31
search :
Original file line number Diff line number Diff line change @@ -140,15 +140,13 @@ Here is an example that cancels builds from pull requests when there are no chan
140
140
jobs :
141
141
post_checkout :
142
142
# Cancel building pull requests when there aren't changed in the docs directory.
143
- # `--quiet` exits with a 1 when there **are** changes,
144
- # so we invert the logic with a !
145
143
#
146
- # If there are no changes (exit 0) we force the command to return with 183.
144
+ # If there are no changes (git diff exits with 0) we force the command to return with 183.
147
145
# This is a special exit code on Read the Docs that will cancel the build immediately.
148
146
- |
149
147
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ];
150
148
then
151
- ! git diff --quiet origin/main -- docs/ && exit 183;
149
+ git diff --quiet origin/main -- docs/ && exit 183;
152
150
fi
153
151
154
152
You can’t perform that action at this time.
0 commit comments