From 8320664e7e20573cc7d19d54388ea04dda4b81e3 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Fri, 8 Nov 2024 16:15:33 -0600 Subject: [PATCH] rtd: Compare against the merge-base rather than main --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 59830c79a404e0..8c4b662f8a9542 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -20,7 +20,7 @@ build: # If there are no changes (git diff exits with 0) we force the command to return with 183. # This is a special exit code on Read the Docs that will cancel the build immediately. - | - if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && [ "$(git diff --quiet origin/main -- Doc/ .readthedocs.yml; echo $?)" -eq 0 ]; + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && [ "$(git diff --quiet $(git merge-base HEAD origin/main) -- Doc/ .readthedocs.yml; echo $?)" -eq 0 ]; then echo "No changes to Doc/ - exiting the build."; exit 183;