From d9ab4d4172b1ff90197668dcd549372503d5c6e9 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 18 Aug 2016 12:40:20 +0200 Subject: [PATCH] Fixed the invalid destination folder for docs --- docs/src/main/asciidoc/ghpages.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh index c3660bf5..8781290d 100755 --- a/docs/src/main/asciidoc/ghpages.sh +++ b/docs/src/main/asciidoc/ghpages.sh @@ -121,19 +121,20 @@ function copy_docs_for_current_version() { if ! git ls-files -i -o --exclude-standard --directory | grep -q ^${file}$; then # Not ignored... cp -rf $f ${ROOT_FOLDER}/ - git add -A ${DESTINATION_REPO_FOLDER}/$file + git add -A $file fi done COMMIT_CHANGES="yes" else - mkdir -p ${DESTINATION_REPO_FOLDER}/${CURRENT_BRANCH} + local destination=${ROOT_FOLDER}/${CURRENT_BRANCH} + mkdir -p ${destination} 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 echo -e "Branch [${CURRENT_BRANCH}] is whitelisted! Will copy the current docs to the [${CURRENT_BRANCH}] folder" for f in ${ROOT_FOLDER}/docs/target/generated-docs/*; do file=${f#${ROOT_FOLDER}/docs/target/generated-docs/*} - copy_docs_for_branch ${file} ${DESTINATION_REPO_FOLDER} + copy_docs_for_branch ${file} ${destination} done COMMIT_CHANGES="yes" else