Skip to content

Commit

Permalink
test: add debug logs and check for empty directory
Browse files Browse the repository at this point in the history
  • Loading branch information
alicejli committed Aug 16, 2023
1 parent c92260f commit 92f136a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions docs/src/main/asciidoc/ghpages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,19 @@ function copy_docs_for_provided_version() {
local FOLDER=${DESTINATION_REPO_FOLDER}/${VERSION}
mkdir -p ${FOLDER}
echo -e "Current tag is [v${VERSION}] Will copy the current docs to the [${FOLDER}] folder"
for f in ${ROOT_FOLDER}/docs/target/generated-docs/*; do
file=${f#${ROOT_FOLDER}/docs/target/generated-docs/*}
copy_docs_for_branch ${file} ${FOLDER}
done
COMMIT_CHANGES="yes"
CURRENT_BRANCH="v${VERSION}"
echo "Listing contents of ${ROOT_FOLDER}/docs/target/generated-docs/"
find ${ROOT_FOLDER}/docs/target/generated-docs/ -type f
if [ "$(find "${ROOT_FOLDER}/docs/target/generated-docs/" -maxdepth 0 -empty)" ]; then
echo "Directory is empty"
exit 1
else
for f in ${ROOT_FOLDER}/docs/target/generated-docs/*; do
file=${f#${ROOT_FOLDER}/docs/target/generated-docs/*}
copy_docs_for_branch ${file} ${FOLDER}
done
COMMIT_CHANGES="yes"
CURRENT_BRANCH="v${VERSION}"
fi
}

# Copies the docs from target to the provided destination
Expand Down

0 comments on commit 92f136a

Please sign in to comment.