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

[tor-commits] [manual/master] create different scripts for when pushing to master, making a merge request, or pushing to the translations branch. part of https://gitlab.torproject.org/tpo/community/l10n/-/issues/40035



commit 15a9ed049b2236295b0b25878eba1af62d868d7d
Author: emma peel <emma.peel@xxxxxxxxxx>
Date:   Thu Sep 2 11:41:43 2021 +0200

    create different scripts for when pushing to master, making a merge request, or pushing to the translations branch. part of https://gitlab.torproject.org/tpo/community/l10n/-/issues/40035
---
 .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 061766f..d7736a3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,6 +30,8 @@ variables:
     GIT_SUBMODULE_STRATEGY: recursive
 
 pages:
+  only:
+    - master
   script:
     - *apt-template
     - DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl python3-cryptography i18nspector apt-utils -y
@@ -48,8 +50,48 @@ pages:
     - git clone https://gitlab.torproject.org/tpo/community/l10n.git
     - echo 'lets see if there are any updates in the strings for translation'
     - l10n/bin/check_po_status.py tbmanual-contentspot
+  artifacts:
+    paths:
+      - public
+
+pages:
+  only:
+    - translations
+  script:
+    - *apt-template
+    - DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl python3-cryptography i18nspector apt-utils -y
+    - pip3 install virtualenv
+    - virtualenv venv
+    - source venv/bin/activate
+    - pip3 install lektor
+    - echo 'checking out translations'
+    - rm -rf i18n
+    - git clone --branch tbmanual-contentspot https://git.torproject.org/translation.git i18n
+    - echo 'building lektor 3 times to get translations in place'
+    - lektor plugins reinstall
+    - lektor build --output-path public && lektor build --output-path public && lektor build --output-path public
+    - echo 'ok, we built it! now we will make some tests'
+    - pip3 install polib
+    - git clone https://gitlab.torproject.org/tpo/community/l10n.git
     - echo 'lets see if there are any broken links on the translations'
     - l10n/bin/check_markdown_links.py i18n/
   artifacts:
     paths:
       - public
+
+pages:
+  only:
+    - merge_requests
+  script:
+    - *apt-template
+    - DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl python3-cryptography i18nspector apt-utils -y
+    - pip3 install virtualenv
+    - virtualenv venv
+    - source venv/bin/activate
+    - pip3 install lektor
+    - echo 'building lektor'
+    - lektor plugins reinstall
+    - lektor build --output-path public
+  artifacts:
+    paths:
+      - public

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits