Michael Ernst | 648d3de | 2015-12-11 11:48:55 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | ROOT=$TRAVIS_BUILD_DIR/.. |
| 3 | |
Michael Ernst | cfbcb07 | 2015-12-11 18:46:59 -0800 | [diff] [blame] | 4 | # Fail the whole script if any command fails |
| 5 | set -e |
| 6 | |
Michael Ernst | ced5a71 | 2016-02-11 13:52:05 -0800 | [diff] [blame] | 7 | export SHELLOPTS |
| 8 | |
Werner Dietl | 2944842 | 2016-11-20 17:05:39 -0500 | [diff] [blame] | 9 | SLUGOWNER=${TRAVIS_REPO_SLUG%/*} |
Werner Dietl | 1998e22 | 2017-04-16 18:06:51 -0700 | [diff] [blame] | 10 | if [[ "$SLUGOWNER" == "" ]]; then |
| 11 | SLUGOWNER=typetools |
| 12 | fi |
| 13 | |
Werner Dietl | 2944842 | 2016-11-20 17:05:39 -0500 | [diff] [blame] | 14 | |
Michael Ernst | 648d3de | 2015-12-11 11:48:55 -0800 | [diff] [blame] | 15 | # jsr308-langtools |
Michael Ernst | ced5a71 | 2016-02-11 13:52:05 -0800 | [diff] [blame] | 16 | if [ -d ../jsr308-langtools ] ; then |
| 17 | (cd ../jsr308-langtools && hg pull && hg update) |
| 18 | else |
Michael Ernst | 4511a29 | 2016-11-27 07:25:24 -0800 | [diff] [blame] | 19 | set +e |
| 20 | echo "Running: hg identify https://bitbucket.org/${SLUGOWNER}/jsr308-langtools &>-" |
| 21 | hg identify https://bitbucket.org/${SLUGOWNER}/jsr308-langtools &>- |
Michael Ernst | 1db5769 | 2016-11-27 08:09:59 -0800 | [diff] [blame] | 22 | if [ "$?" -ne 0 ]; then |
| 23 | SLUGOWNER=typetools |
Michael Ernst | 4511a29 | 2016-11-27 07:25:24 -0800 | [diff] [blame] | 24 | fi |
| 25 | set -e |
Michael Ernst | 1db5769 | 2016-11-27 08:09:59 -0800 | [diff] [blame] | 26 | echo "Running: (cd .. && hg clone https://bitbucket.org/${SLUGOWNER}/jsr308-langtools)" |
| 27 | (cd .. && (hg clone https://bitbucket.org/${SLUGOWNER}/jsr308-langtools || hg clone https://bitbucket.org/${SLUGOWNER}/jsr308-langtools)) |
| 28 | echo "... done: (cd .. && hg clone https://bitbucket.org/${SLUGOWNER}/jsr308-langtools)" |
Michael Ernst | ced5a71 | 2016-02-11 13:52:05 -0800 | [diff] [blame] | 29 | fi |
| 30 | (cd ../jsr308-langtools/ && ./.travis-build-without-test.sh) |
Michael Ernst | 648d3de | 2015-12-11 11:48:55 -0800 | [diff] [blame] | 31 | |
Michael Ernst | 0bbe387 | 2016-11-27 06:57:12 -0800 | [diff] [blame] | 32 | ## Compile |
| 33 | echo "running \"ant compile\" for annotation-tools" |
Michael Ernst | 648d3de | 2015-12-11 11:48:55 -0800 | [diff] [blame] | 34 | ant compile |