From 1493ed0eabb13b2ebecc0542091c835d78156e20 Mon Sep 17 00:00:00 2001 From: Jake Awe <50372925+AyodeAwe@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:31:32 -0500 Subject: [PATCH] add some checks to docs upload (#116) --- tools/rapids-upload-docs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/rapids-upload-docs b/tools/rapids-upload-docs index 59c8ea5..9144ff5 100755 --- a/tools/rapids-upload-docs +++ b/tools/rapids-upload-docs @@ -31,6 +31,18 @@ checks() { echo "python -m http.server --directory ${RAPIDS_DOCS_DIR}" exit 0 fi + + if [[ ! "${RAPIDS_VERSION_NUMBER}" =~ ^[0-9]{1,2}\.[0-9]{2}$ ]]; then + echo "ERROR: RAPIDS_VERSION_NUMBER must be a version number in the format X.YY or XX.YY." + exit 1 + fi + + for PROJECT_DIR in "${RAPIDS_DOCS_DIR}"/*; do + if [[ -d "${PROJECT_DIR}/html" && ! -f "${PROJECT_DIR}/html/index.html" ]]; then + echo "ERROR: ${PROJECT_DIR}/html/index.html does not exist." + exit 1 + fi + done }