fix(hicn/docs.sh): create SITE_DIR if it does not exist before moving html folder 10/36010/3
authorMauro Sardara <msardara@cisco.com>
Wed, 20 Apr 2022 16:59:10 +0000 (18:59 +0200)
committerMauro Sardara <msardara@cisco.com>
Wed, 20 Apr 2022 19:18:14 +0000 (19:18 +0000)
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I1cd578f1895f911e4b56d57c564759a6759de052

jjb/scripts/hicn/docs.sh

index 24f47c3..46e8350 100644 (file)
@@ -2,13 +2,15 @@
 set -xe -o pipefail
 
 DOC_DIR="docs/build/html"
-SITE_DIR="build/doc/deploy-site"
+SITE_DIR_ROOT="build/doc"
+SITE_DIR="${SITE_DIR_ROOT}/deploy-site"
 
 echo "---> jjb/scripts/hicn/docs.sh"
 
 bash scripts/build-packages.sh sphinx
 
 if [[ "${JOB_NAME}" == *merge* ]]; then
+  mkdir -p "${SITE_DIR_ROOT}"
   mv -f "${DOC_DIR}" "${SITE_DIR}"
   find "${SITE_DIR}" -type f '(' -name '*.md5' -o -name '*.dot' -o -name '*.map' ')' -delete
 fi