-
Notifications
You must be signed in to change notification settings - Fork 21
/
buildall.sh
executable file
·45 lines (38 loc) · 776 Bytes
/
buildall.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
#!/bin/sh
SOURCES_DIR=src/java
BUILDTOOLS_CP=lib/buildenumerator.jar
error() {
echo "There were errors..."
decrement_buildnumber
exit 1
}
jobCompleted() {
echo "Done!"
}
increment_buildnumber() {
echo "Incrementing build number..."
java -cp $BUILDTOOLS_CP BuildEnumerator $SOURCES_DIR/org/catacombae/dmgextractor/BuildNumber.java 1
}
decrement_buildnumber() {
echo "Decrementing build number..."
java -cp $BUILDTOOLS_CP BuildEnumerator $SOURCES_DIR/org/catacombae/dmgextractor/BuildNumber.java -1
}
ant_build() {
ant build-application
return $?
}
main() {
increment_buildnumber
if [ "$?" -eq 0 ]; then
ant_build
if [ "$?" -eq 0 ]; then
jobCompleted
else
error
fi
else
error
fi
}
# Entry point
main