[release-notes/help-gnome-org] add gitlab pipeline
- From: Link Dupont <link src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [release-notes/help-gnome-org] add gitlab pipeline
- Date: Fri, 27 Aug 2021 16:18:57 +0000 (UTC)
commit 0d66091142ca9ed5a1195f0a959740c1acf29b8c
Author: Link Dupont <link sub-pop net>
Date: Thu Aug 19 13:27:38 2021 -0400
add gitlab pipeline
.gitlab-ci.yml | 19 +++++++++++++++++++
build.sh | 21 +++++++++++++++++++++
2 files changed, 40 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..fc66d4aa
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,19 @@
+image: fedora:34
+
+variables:
+ DEPENDENCIES:
+ findutils
+ gettext
+ git
+ gnome-doc-utils
+ unzip
+ yelp-tools
+
+pages:
+ before_script:
+ - dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES
+ stage: deploy
+ script: sh -xe ./build.sh
+ artifacts:
+ paths:
+ - public
diff --git a/build.sh b/build.sh
new file mode 100644
index 00000000..7db212dd
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+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)
+
+for branch in "${branches[@]}"; do
+ VERSION="$(echo "$branch" | cut -d- -f2- | sed 's/-/./')"
+ 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 "public/${VERSION}/"
+ pushd help-release-notes || exit 1
+ mapfile -t langs < <(ls -1 .)
+ for LANG in "${langs[@]}"; do
+ mkdir -p "public/${VERSION}/${LANG}"
+ yelp-build html --output "public/${VERSION}/${LANG}" "${LANG}/release-notes"
+ done
+ popd || exit 1
+ fi
+done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]