aboutsummaryrefslogtreecommitdiff
path: root/util/travis
diff options
context:
space:
mode:
authorJuozas <juozaspo@gmail.com>2017-08-20 18:27:26 +0300
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-08-20 17:27:26 +0200
commitc8d3d1133945138108aa195e6b3c93b07c6e4fa0 (patch)
treeff416dc280b69edabb035273aadef726a9cb12e9 /util/travis
parentc99dcbaca99c0bf3cf90efb6670d946898e23ae6 (diff)
downloadminetest-c8d3d1133945138108aa195e6b3c93b07c6e4fa0.tar.gz
minetest-c8d3d1133945138108aa195e6b3c93b07c6e4fa0.tar.bz2
minetest-c8d3d1133945138108aa195e6b3c93b07c6e4fa0.zip
Travis-ci build: fix osx jpeg installation failure, git ambiguous argument error (caused by merging commits) and add a workaround for travis commit range bug (#6227)
* common.sh: fix travis-ci build bugs install_macosx_deps: check if jpeg is installed, if not - upgrade it. needs_compile: Check if $TRAVIS_COMMIT_RANGE is valid, if not, rewrite the range with the correct one, and fix git ambiguous argument error. * Changed detection method and removed commments
Diffstat (limited to 'util/travis')
-rw-r--r--util/travis/common.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/util/travis/common.sh b/util/travis/common.sh
index a5b2de728..d040f639f 100644
--- a/util/travis/common.sh
+++ b/util/travis/common.sh
@@ -31,7 +31,12 @@ install_linux_deps() {
# Mac OSX build only
install_macosx_deps() {
brew update
- brew install freetype gettext hiredis irrlicht jpeg leveldb libogg libvorbis luajit
+ brew install freetype gettext hiredis irrlicht leveldb libogg libvorbis luajit
+ if brew ls | grep -q jpeg; then
+ brew upgrade jpeg
+ else
+ brew install jpeg
+ fi
#brew upgrade postgresql
}
@@ -39,6 +44,11 @@ install_macosx_deps() {
TRIGGER_COMPILE_PATHS="src/.*\.(c|cpp|h)|CMakeLists.txt|cmake/Modules/|util/travis/|util/buildbot/"
needs_compile() {
- git diff --name-only $TRAVIS_COMMIT_RANGE | egrep -q "^($TRIGGER_COMPILE_PATHS)"
+ RANGE="$TRAVIS_COMMIT_RANGE"
+ if [[ "$(git diff --name-only $RANGE -- 2>/dev/null)" == "" ]]; then
+ RANGE="$TRAVIS_COMMIT^...$TRAVIS_COMMIT"
+ echo "Fixed range: $RANGE"
+ fi
+ git diff --name-only $RANGE -- | egrep -q "^($TRIGGER_COMPILE_PATHS)"
}