forked from typetools/annotation-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis-build.sh
executable file
·56 lines (40 loc) · 1.19 KB
/
.travis-build.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
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# Optional argument $1 is one of:
# all, test, misc
# If it is omitted, this script does everything.
export GROUP=$1
if [[ "${GROUP}" == "" ]]; then
export GROUP=all
fi
if [[ "${GROUP}" != "all" && "${GROUP}" != "test" && "${GROUP}" != "misc" ]]; then
echo "Bad argument '${GROUP}'; should be omitted or one of: all, test, misc."
exit 1
fi
# Fail the whole script if any command fails
set -e
## Diagnostic output
# Output lines of this script as they are read.
set -o verbose
# Output expanded lines of this script as they are executed.
set -o xtrace
# Don't use "-d" to debug ant, because that results in a log so long
# that Travis truncates the log and terminates the job.
export SHELLOPTS
SLUGOWNER=${TRAVIS_REPO_SLUG%/*}
if [[ "$SLUGOWNER" == "" ]]; then
SLUGOWNER=typetools
fi
./.travis-build-without-test.sh
set -e
if [[ "${GROUP}" == "test" || "${GROUP}" == "all" ]]; then
ant test
fi
if [[ "${GROUP}" == "misc" || "${GROUP}" == "all" ]]; then
## jdkany tests: miscellaneous tests that shouldn't depend on JDK version.
set -e
ant check-style
# TODO: when codebase is reformatted (after merging branches?)
# ant check-format
ant html-validate
ant javadoc
fi