diff --git a/.travis.yml b/.travis.yml index 4be67ea9..aed02f27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: php php: - '7.0' - '7.1' -- '7.2' -- nightly +#- '7.2' +#- nightly cache: directories: @@ -12,7 +12,7 @@ cache: services: - mysql -- redis-server +#- redis-server before_script: - cp .travis/env.travis.php env.php @@ -36,9 +36,7 @@ jobs: deploy: - provider: script skip_cleanup: true - script: - - if [ "$TRAVIS_BRANCH" = "dev" ]; then ./.travis/deploy_script.sh; fi - - if [ "$TRAVIS_BRANCH" = "master" ]; then ./.travis/deploy_script.sh; fi + script: ./.travis/deploy_script.sh on: all_branches: true php: '7.0' diff --git a/.travis/deploy_script.sh b/.travis/deploy_script.sh index f48deaaf..e83049f9 100755 --- a/.travis/deploy_script.sh +++ b/.travis/deploy_script.sh @@ -8,6 +8,12 @@ if [ "$TRAVIS" = "true" ]; then PKG_NAME=$TRAVIS_TAG else echo "On branch $TRAVIS_BRANCH" + + if [ "$TRAVIS_BRANCH" -ne "master" ] && [ "$TRAVIS_BRANCH" -ne "dev" ]; then + echo "Not on valid branch, exiting" + exit 0; + fi; + BASE_VERSION=`php artisan phpvms:version --base-only` PKG_NAME=${BASE_VERSION}-${TRAVIS_BRANCH} fi