[release-notes/help-gnome-org] build from source tarball
- From: Link Dupont <link src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [release-notes/help-gnome-org] build from source tarball
- Date: Fri, 27 Aug 2021 17:46:46 +0000 (UTC)
commit 0899afe58e7ecb7faeddd6ee303757fee1d60b77
Author: Link Dupont <link sub-pop net>
Date: Fri Aug 27 13:17:13 2021 -0400
build from source tarball
build.sh | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/build.sh b/build.sh
index 30514cef..8fba0b13 100644
--- a/build.sh
+++ b/build.sh
@@ -3,18 +3,40 @@
REPO="https://gitlab.gnome.org/Teams/Engagement/release-notes.git"
mapfile -t branches < <(git ls-remote --heads ${REPO} | awk '{print $2}' | cut -d/ -f3 | grep '^gnome-' |
sort -V)
+branches=(wip/subpop/build-html)
for branch in "${branches[@]}"; do
VERSION="$(echo "$branch" | cut -d- -f2- | sed 's/-/./')"
+ VERSION=41
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"
+ curl -L --output "artifacts.zip"
"https://gitlab.gnome.org/Teams/Engagement/release-notes/-/jobs/artifacts/${branch}/download?job=build"
+ unzip artifacts.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 .)
+ pushd "release-notes-${VERSION}/help" || exit 1
+ mapfile -t langs < <(find . -maxdepth 1 -type d)
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"
+ if [ "${LANG}" == "." ]; then
+ continue
+ fi
+ LANG=${LANG/.\//}
+ PO_FILE="${LANG}/${LANG}.po"
+ if [ -e C/index.page ]; then
+ msgfmt -o "${LANG}/${LANG}.mo" "${PO_FILE}"
+ (cd "${LANG}" && itstool -m "${LANG}.mo" ../C/*.page)
+ else
+ for XML_FILE in C/*.xml; do
+ DEST=${LANG}/$(basename "${XML_FILE}")
+ BUILD=0
+ test -e "${DEST}" || BUILD=1
+ test "${PO_FILE}" -nt "${DEST}" && BUILD=1
+ test "${XML_FILE}" -nt "${DEST}" && BUILD=1
+ if [ "${BUILD}" = "1" ]
+ then
+ xml2po -e -p "${PO_FILE}" "${XML_FILE}" > "${DEST}"
+ fi
+ done
+ fi
done
popd || exit 1
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]