forked from NetLogo/NetLogo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nightly.sh
executable file
·46 lines (37 loc) · 1.71 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
45
46
#!/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 -e QTJava.jar
fi
./sbt all
rm -rf tmp/nightly
mkdir -p tmp/nightly
./sbt update
# 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 test:fast 2>&1 | tee tmp/nightly/0-fast-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: test:fast"; exit 1; fi
echo "*** done: test:fast"
./sbt nogen test:fast 2>&1 | tee tmp/nightly/1-nogen-fast-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: nogen test:fast"; exit 1; fi
echo "*** done: nogen test:fast"
./sbt threed test:fast 2>&1 | tee tmp/nightly/2-threed-fast-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: threed test:fast"; exit 1; fi
echo "*** done: threed test:fast"
./sbt test:slow 2>&1 | tee tmp/nightly/3-slow-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: test:slow"; exit 1; fi
echo "*** done: test:slow"
./sbt nogen test:slow 2>&1 | tee tmp/nightly/4-nogen-slow-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: nogen test:slow"; exit 1; fi
echo "*** done: nogen test:slow"
./sbt threed test:slow 2>&1 | tee tmp/nightly/5-threed-slow-test.txt
if [ ${PIPESTATUS[0]} -ne 0 ] ; then echo "*** FAILED: threed test:slow"; exit 1; fi
echo "*** done: threed test:slow"
./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!"