Skip to content

Commit

Permalink
travis: add deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 2, 2019
1 parent 74cabf1 commit 8441a32
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language: php
php:
- '7.2'
- '7.3'
- '7.4snapshot'
- '7.4'

before_install:
# turn off XDebug
Expand All @@ -21,17 +21,33 @@ jobs:
include:
-
stage: compile
php: 7.2
name: "Compile Rector to prefixed PHAR"
before_install:
php: 7.2
script:
- cd compiler
install:
- composer install
script:
- bin/compile
# run prefixed Rector
- ../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:
- composer install --working-dir=compiler
- php compiler/bin/compile
- 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
- cp tmp/rector.phar rector-prefixed/rector
- cd rector-prefixed
- git config user.email "[email protected]"
- git config user.name "Travis CI"
- git add rector rector.phar
- git commit -m "Updated Rector to commit ${TRAVIS_COMMIT}"
- git push --quiet origin master

# Stage 1
-
stage: test
Expand Down

0 comments on commit 8441a32

Please sign in to comment.