]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - continuous/cron.sh
Propagate make failure to the caller (cron)
[can-benchmark.git] / continuous / cron.sh
1 #!/bin/bash
2
3 PATH=$PATH:$HOME/bin
4
5 set -e
6
7 cd $(dirname $0)
8
9 mkdir -p logs
10
11 NOW=$(date +%F_%R:%S)
12 LOG=${NOW}.log
13
14 if ! make -C steps > logs/$LOG 2>&1; then
15        cat logs/$LOG
16        exit 1
17 fi
18
19 make -C www --silent publish
20
21 ( cd logs && git add $LOG && git commit --quiet -m 'Automatic commit' && git push --quiet )