mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-04 16:57:06 +03:00
CI docs checkout merge sha not PR branch (may be on a fork).
This commit is contained in:
parent
8fefc47247
commit
faa1a6c241
9
.github/workflows/docs.yml
vendored
9
.github/workflows/docs.yml
vendored
@ -112,15 +112,16 @@ jobs:
|
|||||||
git -C ${REFREPO} fetch --all
|
git -C ${REFREPO} fetch --all
|
||||||
for X in $(seq 0 $(( $(cat pulls.json | nix run nixpkgs#jq -- length) - 1))) ; do
|
for X in $(seq 0 $(( $(cat pulls.json | nix run nixpkgs#jq -- length) - 1))) ; do
|
||||||
prnum=$(cat pulls.json | nix run nixpkgs#jq -- .[${X}].number)
|
prnum=$(cat pulls.json | nix run nixpkgs#jq -- .[${X}].number)
|
||||||
prbr=$(cat pulls.json | nix run nixpkgs#jq -- -r .[${X}].head.ref)
|
prref=$(cat pulls.json | nix run nixpkgs#jq -- -r .[${X}].merge_commit_sha)
|
||||||
tgt=${TGTBASE}/PR_${prnum}
|
tgt=${TGTBASE}/PR_${prnum}
|
||||||
echo "Checkout Pull Request ${prbr} into PR_${prnum}"
|
echo "Checkout Pull Request ${prnum} at ${prref} into PR_${prnum}"
|
||||||
mkdir $tgt
|
mkdir $tgt
|
||||||
# n.b. the switch here is important to make sure the branch is
|
# n.b. the switch here is important to make sure the branch is
|
||||||
# present in the clone.
|
# present in the clone.
|
||||||
git -C ${REFREPO} switch --discard-changes ${prbr}
|
git -C ${REFREPO} fetch origin ${prref}
|
||||||
|
git -C ${REFREPO} checkout ${prref}
|
||||||
git clone ${REFREPO} ${tgt}
|
git clone ${REFREPO} ${tgt}
|
||||||
git -C ${tgt} switch --discard-changes ${prbr}
|
git -C ${tgt} checkout ${prref}
|
||||||
if [ ! -d ${tgt}/docs/RefMan ] ; then
|
if [ ! -d ${tgt}/docs/RefMan ] ; then
|
||||||
echo "Removing ${tgt}: no RefMan docs in this version"
|
echo "Removing ${tgt}: no RefMan docs in this version"
|
||||||
rm -rf ${tgt}
|
rm -rf ${tgt}
|
||||||
|
Loading…
Reference in New Issue
Block a user