pull branch test into the deploy script itself

This commit is contained in:
Nabeel Shahzad
2018-02-03 13:50:08 -06:00
parent af39f2839f
commit 9ffa669847
2 changed files with 10 additions and 6 deletions

View File

@@ -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'

View File

@@ -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