Skip to content

Commit

Permalink
Add scripts/travis.sh and remove IFs from .travis.yml #62
Browse files Browse the repository at this point in the history
  • Loading branch information
lastzero committed Nov 12, 2018
1 parent ef4f9c3 commit aa831d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -14,8 +14,7 @@ before_script:
- docker-compose -f docker-compose.travis.yml up -d --build

script:
- if [ "$TRAVIS_BRANCH" == "develop" ]; then docker-compose -f docker-compose.travis.yml exec photoprism make all install migrate test-codecov; fi
- if [ "$TRAVIS_BRANCH" != "develop" ]; then docker-compose -f docker-compose.travis.yml exec photoprism make all install migrate test; fi
- scripts/travis.sh

after_script:
- docker-compose -f docker-compose.travis.yml down
Expand Down
12 changes: 12 additions & 0 deletions scripts/travis.sh
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

if [[ -z $TRAVIS_BRANCH ]]; then
echo "TRAVIS_BRANCH must be set" 1>&2
exit 1
fi

if [[ $TRAVIS_BRANCH == "develop" ]]; then
docker-compose -f docker-compose.travis.yml exec photoprism make all install migrate test-codecov;
else
docker-compose -f docker-compose.travis.yml exec photoprism make all install migrate test;
fi

0 comments on commit aa831d3

Please sign in to comment.