[gimp-web/oscp] Copy docs_build from testing.docs.gimp.org to docs.gimp.org



commit ffbcced2ad92279edb609dc4292b116908ffc83e
Author: Jacob Boerema <jgboerema gmail com>
Date:   Tue Aug 2 12:35:54 2022 -0400

    Copy docs_build from testing.docs.gimp.org to docs.gimp.org
    
    Our Dockerfile and entrypoint.sh for docs.gimp.org never worked with
    OpenShift so let's copy the files from testing.docs.gimp.org.
    
    Our testing.docs.gimp.org is now working well enough to move
    it to docs.gimp.org and certainly better than what we currently have.
    
    As soon as the cronjob is made we will have daily updated online
    documentation for 2.10.

 docs.gimp.org/docs_build/Dockerfile    |  9 +++++----
 docs.gimp.org/docs_build/entrypoint.sh | 25 +++++++++++++++++++------
 2 files changed, 24 insertions(+), 10 deletions(-)
---
diff --git a/docs.gimp.org/docs_build/Dockerfile b/docs.gimp.org/docs_build/Dockerfile
index c1a72dd5..597147d8 100644
--- a/docs.gimp.org/docs_build/Dockerfile
+++ b/docs.gimp.org/docs_build/Dockerfile
@@ -1,8 +1,9 @@
-FROM quay.io/centos/centos:stream8
+FROM debian:testing
 
-RUN yum install -y docbook-dtds docbook-style-xsl rsync \
-                   git autoconf automake make pkg-config \
-                   libxslt gettext python3 librsvg2-tools
+RUN apt-get update && apt-get install -y --no-install-recommends \
+    automake build-essential docbook-xml docbook-xsl pkg-config \
+    pngcrush python3 python3-libxml2 xsltproc gettext git \
+    ca-certificates rsync docbook-website librsvg2-bin fonts-noto-cjk
 
 ADD entrypoint.sh /entrypoint.sh
 
diff --git a/docs.gimp.org/docs_build/entrypoint.sh b/docs.gimp.org/docs_build/entrypoint.sh
index 0b0ebb42..e0fbc7d7 100755
--- a/docs.gimp.org/docs_build/entrypoint.sh
+++ b/docs.gimp.org/docs_build/entrypoint.sh
@@ -3,10 +3,23 @@
 set -x
 set -e
 
-git clone --branch master --single-branch --depth 1 https://gitlab.gnome.org/GNOME/gimp-help.git 
/tmp/gimp-help
-export ALL_LINGUAS="ca da de el en en_GB es fi fr hr it ja ko lt nl nn pt_BR ro ru zh_CN"
-cd /tmp/gimp-help && ./autogen.sh --without-gimp && make
+RELEASE=2.10
+BUILD_PATH=/tmp/gimp-help
 
-for dir in html images quickreference xml; do
-    rsync -vlr /tmp/gimp-help/$dir/ /docs_data/docs/2.10test/$dir/
-done
+git clone --depth 1 --single-branch -b gimp-help-${RELEASE//\./\-} 
https://gitlab.gnome.org/GNOME/gimp-help.git ${BUILD_PATH}
+
+#Mark all source files as updated. Needed to get correct translation percentages
+cd ${BUILD_PATH}/src && find . -type f -exec touch {} +
+
+cd ${BUILD_PATH} && ./autogen.sh --without-gimp --prefix=${BUILD_PATH}/build && make && make install
+
+# We need updated po files to get correct percentages, so do make web last
+cd ${BUILD_PATH}/web && BUILD_DIR='.' make
+
+if [ -d "/docs_data/docs/${RELEASE}" ]; then
+    rsync -vlr ${BUILD_PATH}/build/share/gimp/2.0/help/ /docs_data/docs/${RELEASE}/
+else
+    mkdir -p /docs_data/docs/${RELEASE}
+    rsync -vlr ${BUILD_PATH}/build/share/gimp/2.0/help/ /docs_data/docs/${RELEASE}/
+fi
+rsync -vlr ${BUILD_PATH}/web/html/ /docs_data/docs/


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