-
Notifications
You must be signed in to change notification settings - Fork 386
/
.gitlab-ci.yml
68 lines (65 loc) · 2.43 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
57
58
59
60
61
62
63
64
65
66
67
68
# General info: https://docs.gitlab.com/ee/ci/yaml/
doc:
image: ubuntu:jammy
before_script:
- echo -e "section_start:`date +%s`:install_packages[collapsed=true]\r\e[0K\e[1;96mInstalling packages\e[0m"
- apt-get update -qq
- DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends -y xsltproc docbook-xsl nant aspell aspell-en
- echo -e "section_end:`date +%s`:install_packages\r\e[0K"
script:
- mv doc/doc.build.user.linux.templ doc/doc.build.user
- cd doc
- nant -D:spellcheck=true
- if [[ $(ls -1 Aspell/*.log 2>/dev/null | wc -l) -ge 1 ]]; then
echo -e "\e[1;31m!!! Found typos !!!\e[0m";
cat Aspell/*.log;
exit 1;
fi
except:
refs:
- tags
only:
changes:
- .gitlab-ci.yml
- doc/images/en/**/*
- doc/source/**/*
- doc/xsl/**/*
- doc/doc.build*
- doc/Aspell/*
spellcheck-pot:
image: debian:buster
before_script:
- echo -e "section_start:`date +%s`:install_packages[collapsed=true]\r\e[0K\e[1;96mInstalling packages\e[0m"
- apt-get update -qq
- apt-get install -qq --no-install-recommends -y aspell aspell-en gettext gettext-lint
- echo -e "section_end:`date +%s`:install_packages\r\e[0K"
script:
- perl -pi -e 's|\\r||g' Languages/Tortoise.pot
- msginit --no-translator -l en_US -i Languages/Tortoise.pot -o Languages/Tortoise_en.po
- perl -pi -e 's|&([^ ])|\1|g' Languages/Tortoise_en.po
- cp doc/Aspell/TortoiseGit.tmpl.pws doc/Aspell/Temp.pws
- perl -pi -e 's/\$LANG\$/en/g' doc/Aspell/Temp.pws
- POFileSpell --command='aspell --encoding=UTF-8 --add-extra-dicts="./doc/Aspell/en.pws" --add-extra-dicts=./doc/Aspell/Temp.pws --add-extra-dicts=./doc/Aspell/TortoisePot.pws --lang=en list' Languages/Tortoise_en.po > spellcheck.log
- if [[ $(cat spellcheck.log 2>/dev/null | wc -l) -gt 1 ]]; then
echo -e "\e[1;31m!!! Found typos !!!\e[0m";
cat spellcheck.log;
exit 1;
fi
except:
refs:
- tags
only:
changes:
- .gitlab-ci.yml
- Languages/Tortoise.pot
- doc/Aspell/*.pws
commit-messages:
image: debian:buster
before_script:
- echo -e "section_start:`date +%s`:install_packages[collapsed=true]\r\e[0K\e[1;96mInstalling packages\e[0m"
- apt-get update -qq
- apt-get install -qq -y git
- echo -e "section_end:`date +%s`:install_packages\r\e[0K"
script:
- .gitlab-ci/check-commits.sh
only: [merge_requests]