[release-notes/help-gnome-org] ci: update build script to build from tarball
- From: Link Dupont <link src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [release-notes/help-gnome-org] ci: update build script to build from tarball
- Date: Wed, 1 Sep 2021 03:17:46 +0000 (UTC)
commit 5017f79fdc7e27feb1546686a5ae4b8934480ad2
Author: Link Dupont <link sub-pop net>
Date: Tue Aug 31 21:47:04 2021 -0400
ci: update build script to build from tarball
.gitlab-ci.yml | 3 ++-
build.sh | 25 ++++++++++++++++++-------
2 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fc66d4aa..f4869a97 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,7 @@ variables:
gettext
git
gnome-doc-utils
+ rsync
unzip
yelp-tools
@@ -13,7 +14,7 @@ pages:
before_script:
- dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES
stage: deploy
- script: sh -xe ./build.sh
+ script: bash -xe ./build.sh
artifacts:
paths:
- public
diff --git a/build.sh b/build.sh
index 30514cef..7b6b1ad6 100644
--- a/build.sh
+++ b/build.sh
@@ -9,13 +9,24 @@ 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"
- 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
+ tar -xf "release-notes-${VERSION}.tar.gz"
+ mkdir -p "${CI_PROJECT_DIR}/output/"
+ mkdir -p "${CI_PROJECT_DIR}/public/${VERSION}"
+ 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}/"
+ if [ "${LANG}" == C ]; then
+ rsync -av "${CI_PROJECT_DIR}/output/" "${CI_PROJECT_DIR}/public/${VERSION}/"
+ else
+ mv "${CI_PROJECT_DIR}/output/index.html"
"${CI_PROJECT_DIR}/public/${VERSION}/index.html.${LANG}"
+ mv "${CI_PROJECT_DIR}/output/developers.html"
"${CI_PROJECT_DIR}/public/${VERSION}/developers.html.${LANG}"
+ mv "${CI_PROJECT_DIR}/output/i18n.html"
"${CI_PROJECT_DIR}/public/${VERSION}/i18n.html.${LANG}"
+ mv "${CI_PROJECT_DIR}/output/${LANG}.css"
"${CI_PROJECT_DIR}/public/${VERSION}/${LANG}.css"
+ rsync -v --ignore-existing "${CI_PROJECT_DIR}/output/figures/"
"${CI_PROJECT_DIR}/public/${VERSION}/figures/"
+ 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]