[gtk/docs-gtk-org] Move CI commands to shell scripts



commit 0fb1a5672cd8fc59e20d6cf43a9f6cdbd9609cba
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sun Oct 3 11:31:35 2021 +0100

    Move CI commands to shell scripts
    
    This way, we can test everything locally in an easier way.

 .gitlab-ci.yml        | 16 ++--------------
 download-reference.sh |  0
 prepare-docs.sh       | 19 +++++++++++++++++++
 publish.sh            | 10 ++++++++++
 4 files changed, 31 insertions(+), 14 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b45a71c5ad..bcdf835618 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,17 +12,7 @@ reference:
   needs: []
   script:
     - sh -x ./download-reference.sh
-    - meson setup  _build
-    - meson compile -C _build
-    - mv _build/glib/glib/glib/ docs/glib/
-    - mv _build/glib/gmodule/gmodule/ docs/gmodule/
-    - mv _build/glib/gobject/gobject/ docs/gobject/
-    - mv _build/glib/gio/gio/ docs/gio/
-    - mv _build/gtk3/gdk/gdk3/ docs/gdk3/
-    - mv _build/gtk3/gdk/gdk3-x11/ docs/gdk3-x11/
-    - mv _build/gtk3/gtk/gtk3/ docs/gtk3/
-    - mv _build/atk/atk/atk/ docs/atk/
-    - mv _build/atk/atspi2/atspi2/ docs/atspi2/
+    - sh -x ./prepare-docs.sh docs
   artifacts:
     paths:
       - docs
@@ -31,9 +21,7 @@ pages:
   stage: deploy
   needs: ['reference']
   script:
-    - mkdir public
-    - mv docs/* public/
-    - cp static/* public/
+    - sh -x ./publish.sh docs static public
   artifacts:
     paths:
       - public
diff --git a/download-reference.sh b/download-reference.sh
old mode 100644
new mode 100755
diff --git a/prepare-docs.sh b/prepare-docs.sh
new file mode 100755
index 0000000000..52fed27e33
--- /dev/null
+++ b/prepare-docs.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+TARGET=$1
+
+meson setup  _build
+meson compile -C _build
+
+mv _build/glib/glib/glib/ ${TARGET}/glib/
+mv _build/glib/gmodule/gmodule/ ${TARGET}/gmodule/
+mv _build/glib/gobject/gobject/ ${TARGET}/gobject/
+mv _build/glib/gio/gio/ ${TARGET}/gio/
+
+mv _build/gtk3/gdk/gdk3/ ${TARGET}/gdk3/
+mv _build/gtk3/gdk/gdk3-x11/ ${TARGET}/gdk3-x11/
+mv _build/gtk3/gtk/gtk3/ ${TARGET}/gtk3/
+
+mv _build/atk/atk/atk/ ${TARGET}/atk/
+
+mv _build/atk/atspi2/atspi2/ ${TARGET}/atspi2/
diff --git a/publish.sh b/publish.sh
new file mode 100755
index 0000000000..763cff536e
--- /dev/null
+++ b/publish.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+DOCSDIR=$1
+STATICDIR=$2
+TARGET=$3
+
+mkdir -p ${TARGET}
+
+mv ${DOCSDIR}/* ${TARGET}
+cp -r ${STATICDIR}/* ${TARGET}


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