Verified Commit 41efb328 authored by Adrian DC's avatar Adrian DC
Browse files

docs(prepare): prepare empty HTML coverage report if missing locally

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent f8600c0a
Loading
Loading
Loading
Loading
Loading
+7 −0
Changes for docs/prepare.sh: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -48,6 +48,13 @@ projectYear=$(date '+%Y')
cp -f "${docs_path}/.pages.in" "${docs_path}/.pages"
sed -i "s/%MKDOCS_EXPORTER_PDF_OUTPUT%/${MKDOCS_EXPORTER_PDF_OUTPUT:?}/g" "${docs_path}/.pages"

# Prepare coverage
htmlReportDir=$(grep '^      html_report_dir: ' "${root_path}/mkdocs.yml" | cut -d':' -f2- | xargs echo)
if [ ! -e "${docs_path}/../${htmlReportDir}/index.html" ]; then
  mkdir -p "${docs_path}/../${htmlReportDir}/"
  touch "${docs_path}/../${htmlReportDir}/index.html"
fi

# Export usage
cp -f "${root_path}/README.md" "${docs_path}/index.md"
sed -i "s#\(\[.*\]\)(.*/docs/#\1(#g" "${docs_path}/index.md"