X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/3a2436513da2275418a9cf4c6c97903cf8612490..f3923078af0c63aa5c297a58aca5b7943a0ddbc5:/continuous/cron.sh diff --git a/continuous/cron.sh b/continuous/cron.sh index 14e3d5a..6b951aa 100755 --- a/continuous/cron.sh +++ b/continuous/cron.sh @@ -6,9 +6,23 @@ set -e cd $(dirname $0) +# Wakeup glab +sudo /usr/sbin/etherwake 00:0c:f1:77:ec:46 +while ! ssh sojka@glab true; do sleep 1; done +sleep 30 # Wait a bit to finish all boot jobs etc. + mkdir -p logs NOW=$(date +%F_%R:%S) -LOG=logs/${NOW}.log +LOG=${NOW}.log + +if ! make -C steps > logs/$LOG 2>&1; then + cat logs/$LOG + exit 1 +fi + +make -C www --silent publish + +( cd logs && git add $LOG && git commit --quiet -m 'Automatic commit' && git push --quiet ) -make -C steps > $LOG 2>&1 || cat $LOG +ssh -f sojka@glab 'sudo /sbin/poweroff