forked from torproject/support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 lines (51 loc) · 1.89 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
image: debian:buster-slim
cache:
key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG}
paths:
- packages
- lego
- apt-cache
# This template should be usable on any system that's based on apt.
# taken from tor gitlabci
.apt-template: &apt-template |
export LC_ALL=C.UTF-8
echo Etc/UTC > /etc/timezone
mkdir -p apt-cache
export APT_CACHE_DIR="$(pwd)/apt-cache"
echo 'quiet "1";' \
'APT::Install-Recommends "0";' \
'APT::Install-Suggests "0";' \
'APT::Acquire::Retries "20";' \
'APT::Get::Assume-Yes "true";' \
'Dpkg::Use-Pty "0";' \
"Dir::Cache::Archives \"${APT_CACHE_DIR}\"; " \
>> /etc/apt/apt.conf.d/99gitlab
apt-get update -qq
apt-get upgrade -qy
variables:
GIT_SUBMODULE_STRATEGY: recursive
pages:
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 -y
- pip3 install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip3 install lektor
- echo 'checking out translations'
- rm -rf i18n
- git clone --branch support-portal https://git.torproject.org/translation.git i18n
- echo 'reinstalling plugins to have last version'
- lektor plugins reinstall
- echo 'building lektor 3 times to get translations in place'
- lektor build --output-path public && lektor build --output-path public && lektor build --output-path public
- 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 support-portal
- echo 'lets check translations links'
- pip3 install polib
- l10n/bin/check_markdown_links.py i18n/
artifacts:
paths:
- public
- i18n