File: gitlab-check

package info (click to toggle)
debian-handbook 11.20220922
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 152,440 kB
  • sloc: xml: 32,387; sh: 241; makefile: 62; perl: 54; python: 26
file content (28 lines) | stat: -rwxr-xr-x 551 bytes parent folder | download
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
#!/bin/sh

. $(dirname $0)/common.sh

check_cwd

LANGS=[a-z][a-z]-[A-Z][A-Z]

failed=""
for lang in $LANGS; do
    tempfile=$(mktemp build-log-$lang-XXXXXX)
    echo "Building TXT version for lang=$lang"
    if publican build --formats=txt --langs=$lang >$tempfile 2>&1; then
	echo "SUCCESS."
    else
	echo "ERROR: Build failed. Here's the build log:"
	cat $tempfile
	failed="${failed:+$failed }$lang"
    fi
    rm -f $tempfile
done

if [ -n "$failed" ]; then
    echo "ERROR: the following languages failed to build: $failed"
    exit 1
fi

exit 0