]> ruderich.org/simon Gitweb - safcm/safcm.git/blob - ci/run
ci: check for untracked and unignored files
[safcm/safcm.git] / ci / run
1 #!/bin/sh
2
3 set -eu
4 set -x
5
6
7 PATH=$HOME/go/bin:$PATH
8 export PATH
9
10 flags=
11 if test $# -ne 0; then
12     flags="$*"
13 fi
14
15 make $flags
16 make test $flags
17
18 # Strict umask
19 umask 077
20 rm -rf *
21 git checkout .
22 make $flags
23 make test $flags
24
25 # Additional static checks only run in CI
26 go get honnef.co/go/tools/cmd/staticcheck
27 staticcheck ./...
28
29 test -z "$(git clean -nd)" # any untracked files left?
30 make clean
31 test -z "$(git clean -ndx)" # any unignored files left?