From de05155543d99a6989883ae331202c7c79f606ed Mon Sep 17 00:00:00 2001 From: Jimmy Chu Date: Fri, 24 Sep 2021 07:34:37 +0800 Subject: [PATCH] Fix gitlab command (#9843) --- substrate/.gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/substrate/.gitlab-ci.yml b/substrate/.gitlab-ci.yml index c5cb6c571b..fa98692370 100644 --- a/substrate/.gitlab-ci.yml +++ b/substrate/.gitlab-ci.yml @@ -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