From 35ff0ed3647781efeda21d2cfd1db735742aed2a Mon Sep 17 00:00:00 2001 From: Bill Mills Date: Tue, 10 Oct 2023 14:25:08 -0400 Subject: [PATCH] Docs: fix for the readthedocs PR rendering The original procedure worked only when the PR was coming from the same repo that was the target of the PR. This is not normally the case. The original check out has the commit we need. Just use it as the remote, fetch and checkout the commit hash we need. Signed-off-by: Bill Mills --- .readthedocs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index efd2d272..20342626 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -22,7 +22,8 @@ build: - git clone --recurse-submodules https://github.com/OpenAMP/openamp-docs.git # now adjust the focused submodule to the PR in progress - echo "URL=${READTHEDOCS_GIT_CLONE_URL} COMMIT=${READTHEDOCS_GIT_COMMIT_HASH}" - - (cd openamp-docs/libmetal; git remote add this_pr ${READTHEDOCS_GIT_CLONE_URL}; git fetch this_pr ) + - (cd openamp-docs/libmetal; git remote add this_pr ../../.git ) + - (cd openamp-docs/libmetal; git fetch this_pr $(cd ../..; git rev-parse HEAD) ) - (cd openamp-docs/libmetal; git checkout $(cd ../..; git rev-parse HEAD) ) - (cd openamp-docs/libmetal; git log -n 1 --oneline) - (cd openamp-docs; git submodule status)