Skip to content

Commit

Permalink
merge 2 jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 20, 2020
1 parent 1ec2f28 commit 1f4b36d
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,22 @@ before_install:
# turn off XDebug
- phpenv config-rm xdebug.ini

install:
- composer install --no-progress

stages:
- name: compile
if: (branch = master OR tag IS present) && type = push
- name: phar
if: (branch = master OR tag IS present) && type = push

jobs:
include:
# inspired by https://github.com/phpstan/phpstan-src/blob/088b9fab470632cea07f08a936fb0923a59b2ecb/.travis.yml#L47-L59
# "Deploy to https://github.com/rectorphp/rector-prefixed"
-
stage: compile
name: "Compile Rector to prefixed PHAR"
name: Compile and Release rector.phar
if: (branch = master OR tag IS present) && type = push
php: 7.2
script:
- cd compiler
- composer install
- bin/compile
- ../tmp/rector.phar

# inspired by https://github.com/phpstan/phpstan-src/blob/088b9fab470632cea07f08a936fb0923a59b2ecb/.travis.yml#L47-L59
-
stage: phar
name: "Deploy PHAR to https://github.com/rectorphp/rector-prefixed"
php: 7.2
script:
- cd ..

# reuse tmp/rector.phar from previous job
- git clone https://${GITHUB_TOKEN}@github.com/rectorphp/rector-prefixed.git rector-prefixed > /dev/null 2>&1
- cp tmp/rector.phar rector-prefixed/rector.phar
Expand All @@ -51,9 +40,5 @@ jobs:

- if [ "${TRAVIS_TAG}" != "" ]; then git tag "${TRAVIS_TAG}" && git push --quiet origin ${TRAVIS_TAG}; fi

cache:
directories:
- $HOME/.composer/cache

notifications:
email: false

0 comments on commit 1f4b36d

Please sign in to comment.