Properly get the commit range for cache
This commit is contained in:
parent
1ec26a0eea
commit
a628a9b4da
1 changed files with 10 additions and 2 deletions
12
.travis.yml
12
.travis.yml
|
|
@ -14,8 +14,16 @@ install:
|
|||
- pod --version
|
||||
before_script:
|
||||
- pod install
|
||||
- git diff --quiet "$TRAVIS_COMMIT_RANGE" -- ; GIT_DIFF_EXIT_CODE=$?
|
||||
- |
|
||||
if [ ! $(git diff --name-only master..."$TRAVIS_COMMIT" | grep "Cartfile.resolved") ] && [ -d "Carthage/Build" ]; then
|
||||
if [ "$GIT_DIFF_EXIT_CODE" -gt 1 ] ; then
|
||||
git remote set-branches --add origin master
|
||||
git fetch
|
||||
TRAVIS_COMMIT_RANGE=origin/master...
|
||||
fi
|
||||
- echo $TRAVIS_COMMIT_RANGE
|
||||
- |
|
||||
if [ ! $(git diff --name-only "$TRAVIS_COMMIT_RANGE" | grep "Cartfile.resolved") ] && [ -d "Carthage/Build" ]; then
|
||||
echo "Use cached carthage dependencies."
|
||||
ls -ld Carthage/Build/iOS/*framework
|
||||
else
|
||||
|
|
@ -23,7 +31,7 @@ before_script:
|
|||
travis_wait 45 carthage bootstrap --platform iOS
|
||||
fi
|
||||
- |
|
||||
if [ ! $(git diff --name-only master..."$TRAVIS_COMMIT" | grep -E "gopenpgp_build.sh|gopenpgpwrapper.go") ] && [ -d "go/dist/Gopenpgpwrapper.framework" ]; then
|
||||
if [ ! $(git diff --name-only "$TRAVIS_COMMIT_RANGE" | grep -E "gopenpgp_build.sh|gopenpgpwrapper.go") ] && [ -d "go/dist/Gopenpgpwrapper.framework" ]; then
|
||||
echo "Use cached go dependencies."
|
||||
ls -ld go/dist/*framework
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue