forked from NetLogo/NetLogo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nightly.sh
executable file
·44 lines (36 loc) · 1.69 KB
/
nightly.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash -ev
# -e makes the whole thing die with an error if any command does
# -v lets you see the commands as they happen
if [ "$1" == --clean ] ; then
git clean -fdX
git submodule update --init
git submodule foreach git clean -fdX
fi
./sbt all
rm -rf tmp/nightly
mkdir -p tmp/nightly
# here we're using pipes so "-e" isn't enough to stop when something fails.
# maybe there's an easier way, than I've done it below, I don't know.
# I suck at shell scripting - ST 2/15/11
./sbt fast:test 2>&1 | tee tmp/nightly/0-fast-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: fast:test"; exit 1; fi
echo "*** done: fast:test"
./sbt nogen fast:test 2>&1 | tee tmp/nightly/1-nogen-fast-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: nogen fast:test"; exit 1; fi
echo "*** done: nogen fast:test"
./sbt threed fast:test 2>&1 | tee tmp/nightly/2-threed-fast-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: threed fast:test"; exit 1; fi
echo "*** done: threed fast:test"
./sbt slow:test 2>&1 | tee tmp/nightly/3-slow-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: slow:test"; exit 1; fi
echo "*** done: slow:test"
./sbt nogen slow:test 2>&1 | tee tmp/nightly/4-nogen-slow-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: nogen slow:test"; exit 1; fi
echo "*** done: nogen slow:test"
./sbt threed slow:test 2>&1 | tee tmp/nightly/5-threed-slow-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: threed slow:test"; exit 1; fi
echo "*** done: threed slow:test"
./sbt depend 2>&1 | tee tmp/nightly/6-depend.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: depend"; exit 1; fi
echo "*** done: depend"
echo "****** all done!"