Remove bogus reference to checkout.ico
[TortoiseGit.git] / .gitlab-ci / check.sh
blob27f1a85a8ab113bce1a9fab846557d1d19f29be9
1 #!/bin/bash
3 if [[ "$CI" != 'true' ]]; then
4 echo "no CI detected"
5 exit 1
6 fi
8 function section_start() {
9 local section_title="${1}"
10 local section_description="${2:-$section_title}"
11 echo -e "section_start:`date +%s`:${section_title}[collapsed=false]\r\e[0K\e[1;96m${section_description}\e[0m"
13 function section_end() {
14 local section_title="${1}"
15 echo -e "section_end:`date +%s`:${section_title}\r\e[0K"
18 rm -f src/Resources/TGitHelpMapping.ini src/Resources/TGitMergeHelpMapping.ini src/TortoiseGitSetup/HTMLHelpfiles.wxi
20 err=0
21 pushd "$CI_PROJECT_DIR/doc" > /dev/null
23 section_start "build_doc" "Building the documentation"
24 (set -x; mv doc.build.user.linux.templ doc.build.user)
25 (set -x; nant -D:spellcheck=true)
26 result=$?
27 section_end "build_doc"
28 if [[ $result -ne 0 ]]; then
29 echo -e "⚠️ \e[1;31mBuilding documentation failed, see above for details! ⚠️\e[0m"
30 err=1
33 if [[ $(ls -1 Aspell/*.log 2>/dev/null | wc -l) -ge 1 ]]; then
34 echo -e "⚠️ \e[1;31mFound typos in documentation: ⚠️\e[0m";
35 err=1
36 cat Aspell/*.log;
37 else
38 echo -e "✔️ \e[32;1mNo spell errors detected in documentation. ✔️\e[0m"
41 section_start "idd_inconsistencies" "Checking for unused or missing IDDs"
42 (set -x; ./CheckIDD.sh)
43 result=$?
44 section_end "idd_inconsistencies"
45 if [[ $result -ne 0 ]]; then
46 echo -e "⚠️ \e[1;31mFound inconsistencies, see above ⚠️\e[0m";
47 err=1
48 else
49 echo -e "✔️ \e[32;1mNo inconsistencies found. ✔️\e[0m"
51 popd > /dev/null
53 section_start "helpmapping_inconsistencies" "Checking for (uncommitted) inconsistencies in the help mapping files"
54 git diff --no-prefix --color -- src/Resources/TGitHelpMapping.ini src/Resources/TGitMergeHelpMapping.ini src/TortoiseGitSetup/HTMLHelpfiles.wxi
55 result=$?
56 git diff-index --no-prefix --color --quiet HEAD -- src/Resources/TGitHelpMapping.ini src/Resources/TGitMergeHelpMapping.ini src/TortoiseGitSetup/HTMLHelpfiles.wxi
57 result=$(($result + $?))
58 section_end "helpmapping_inconsistencies"
59 if [[ $result -ne 0 ]]; then
60 echo -e "⚠️ \e[1;31mFound inconsistencies, see above ⚠️\e[0m";
61 err=1
62 else
63 echo -e "✔️ \e[32;1mNo inconsistencies found. ✔️\e[0m"
66 exit $err