rector/.travis.yml
Tomas Votruba bc41ba2b2e
phpstan cleanup (#4509)
* move tag objects to ValueObject namespace

* [ci] temporarily disable weird broken monorepo split, wait for move to github actoins
2020-10-29 23:06:26 +01:00

65 lines
2.3 KiB
YAML

os: linux
dist: bionic
language: php
php: 7.4
if: (branch = master OR tag IS present) && type = push
before_install:
# turn off XDebug
- phpenv config-rm xdebug.ini
# autoload has changed on Composer 2 and is broken
- composer self-update --1
jobs:
include:
# -
# name: "Split Monorepo"
# script: |
# composer update --ansi
#
# if [ "${TRAVIS_TAG}" != "" ]; then
# vendor/bin/monorepo-builder split --max-processes 6 --tag "${TRAVIS_TAG}" --ansi
# else
# vendor/bin/monorepo-builder split --max-processes 6 --ansi
# fi
# inspired by https://github.com/phpstan/phpstan-src/blob/088b9fab470632cea07f08a936fb0923a59b2ecb/.travis.yml#L47-L59
# "Deploy to https://github.com/rectorphp/rector-prefixed"
-
name: Compile and Release rector.phar
script:
- cd compiler
# see https://gist.github.com/jeffersonmartin/d0d4a8dfec90d224d14f250b36c74d2f
# see https://www.previousnext.com.au/blog/managing-composer-github-access-personal-access-tokens
- composer config -g github-oauth.github.com $GITHUB_TOKEN
- composer install --ansi
- bin/compile --ansi
- ../tmp/rector.phar --ansi
- 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
- cp tmp/rector.phar rector-prefixed/rector
- cd rector-prefixed
- git config user.name "TomasVotruba"
- git config user.email "tomas.vot@gmail.com"
- git add rector rector.phar
- if [ "${TRAVIS_TAG}" != "" ]; then COMMIT_MSG="Rector ${TRAVIS_TAG}"; else COMMIT_MSG="Updated Rector to commit ${TRAVIS_COMMIT}"; fi
- git commit -m "${COMMIT_MSG}"
- git push --quiet origin master -f
- if [ "${TRAVIS_TAG}" != "" ]; then git tag "${TRAVIS_TAG}" && git push --quiet origin ${TRAVIS_TAG}; fi
notifications:
email: false