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 3b917e6
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 3b917e6

Please sign in to comment.