Fix gitlab command (#9843)

This commit is contained in:
Jimmy Chu
2021-09-24 07:34:37 +08:00
committed by GitHub
parent 283c8daa81
commit de05155543
+5 -3
View File
@@ -763,12 +763,14 @@ publish-rustdoc:
- cp README.md /tmp/doc/
- git checkout gh-pages
# Remove directories no longer necessary, as specified in $RUSTDOCS_DEPLOY_REFS.
# Also ensure $RUSTDOCS_DEPLOY_REFS is non-space
# Also ensure $RUSTDOCS_DEPLOY_REFS is not just empty spaces.
# Even though this block spans multiple lines, they are concatenated to run as a single line
# command, so note for the semi-colons in the inner-most code block.
- if [[ ! -z ${RUSTDOCS_DEPLOY_REFS// } ]]; then
for FILE in *; do
if [[ ! " $RUSTDOCS_DEPLOY_REFS " =~ " $FILE " ]]; then
echo "Removing ${FILE}..."
rm -rf $FILE
echo "Removing ${FILE}...";
rm -rf $FILE;
fi
done
fi