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 <bill.mills@linaro.org>
This commit is contained in:
Bill Mills
2023-10-11 18:55:43 +02:00
committed by Arnaud Pouliquen
parent d7c605c272
commit dceaa9f2c4
+2 -1
View File
@@ -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)