[release-notes/help-gnome-org] ci: update build script to build from tarball




commit 0671482d3e7e61913929d7ee05c8fa6c512db1ea
Author: Link Dupont <link sub-pop net>
Date:   Tue Aug 31 21:47:04 2021 -0400

    ci: update build script to build from tarball

 build.sh | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/build.sh b/build.sh
index 30514cef..298db871 100644
--- a/build.sh
+++ b/build.sh
@@ -9,13 +9,22 @@ for branch in "${branches[@]}"; do
     if [ "${VERSION}" -ge 41 ]; then
         curl -L --output "release-notes-${VERSION}.zip" 
"https://gitlab.gnome.org/Teams/Engagement/release-notes/-/jobs/artifacts/${branch}/download?job=build";
         unzip "release-notes-${VERSION}.zip"
+        tar -xf "release-notes-${VERSION}.tar.gz"
         mkdir -p "${CI_PROJECT_DIR}/public/${VERSION}/"
-        pushd help-release-notes || exit 1
-        mapfile -t langs < <(ls -1 .)
-        for LANG in "${langs[@]}"; do
-            mkdir -p "${CI_PROJECT_DIR}/public/${VERSION}/${LANG}"
-            yelp-build html --output "${CI_PROJECT_DIR}/public/${VERSION}/${LANG}" "${LANG}/release-notes"
-        done
+        mkdir -p "${CI_PROJECT_DIR}/output/"
+        pushd "release-notes-${VERSION}" || exit 1
+        while IFS= read -r -d '' LANG_DIR
+        do
+            LANG=$(basename "${LANG_DIR}")
+            yelp-build html --output "${CI_PROJECT_DIR}/output/" --path ./help/C "./help/${LANG}/*.page"
+            if [ "${LANG}" == C ]; then
+                mv "${CI_PROJECT_DIR}/output/*" "${CI_PROJECT_DIR}/public/${VERSION}"
+            else
+                mv "${CI_PROJECT_DIR}/index.html"      
"${CI_PROJECT_DIR}/public/${VERSION}/index.html.${LANG}"
+                mv "${CI_PROJECT_DIR}/developers.html" 
"${CI_PROJECT_DIR}/public/${VERSION}/developers.html.${LANG}"
+                mv "${CI_PROJECT_DIR}/i18n.html"       
"${CI_PROJECT_DIR}/public/${VERSION}/i18n.html.${LANG}"
+            fi
+        done < <(find help/* -maxdepth 0 -type d -print0)
         popd || exit 1
     fi
 done


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]