From 1c8c65b38423965a1756fa708aded165cf0a7dce Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 18 Aug 2016 12:54:07 +0200 Subject: [PATCH] Creating folder in ghpages only when branch is whitelisted --- docs/src/main/asciidoc/ghpages.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh index 93d66227..c43f1904 100755 --- a/docs/src/main/asciidoc/ghpages.sh +++ b/docs/src/main/asciidoc/ghpages.sh @@ -129,6 +129,7 @@ function copy_docs_for_current_version() { echo -e "Current branch is [${CURRENT_BRANCH}]" # http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin if [[ ",${WHITELISTED_BRANCHES_VALUE}," = *",${CURRENT_BRANCH},"* ]] ; then + mkdir -p ${ROOT_FOLDER}/${CURRENT_BRANCH} echo -e "Branch [${CURRENT_BRANCH}] is whitelisted! Will copy the current docs to the [${CURRENT_BRANCH}] folder" for f in docs/target/generated-docs/*; do file=${f#docs/target/generated-docs/*}