51 lines
1.9 KiB
YAML
51 lines
1.9 KiB
YAML
language: php
|
|
php:
|
|
- 5.3
|
|
- 5.4
|
|
- 5.5
|
|
- 5.6
|
|
- 7
|
|
- hhvm
|
|
- nightly
|
|
|
|
matrix:
|
|
allow_failures:
|
|
- php: nightly
|
|
fast-finish: true
|
|
|
|
install:
|
|
- composer install
|
|
|
|
before_script:
|
|
- export PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
|
|
|
|
script:
|
|
- find . -not \( -path './vendor' -prune \) -type f -name '*.php' -print0 | xargs -0 -I file php -l file > /dev/null
|
|
|
|
after_success:
|
|
- |
|
|
[ "$TRAVIS_PHP_VERSION" != "5.3" ] && echo "Skipping phpDoc deployment because this is not on the required runtime" && exit
|
|
[[ ",$DEPLOY_PHPDOC_BRANCHES," != *,"$TRAVIS_BRANCH",* ]] && echo "Skipping phpDoc deployment because this branch is not permitted to deploy" && exit
|
|
[ "$TRAVIS_SECURE_ENV_VARS" != "true" ] && echo "Skipping phpDoc deployment because this is no environment with write access to the repository" && exit
|
|
./build/generate-phpdoc.sh "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR/build/phpdoc-$TRAVIS_BRANCH" "Pico 1.0 API Documentation ($TRAVIS_BRANCH)" || exit 1
|
|
./build/deploy-phpdoc.sh "$TRAVIS_REPO_SLUG" "$TRAVIS_BUILD_DIR/build/phpdoc-$TRAVIS_BRANCH" "$TRAVIS_BRANCH @ $TRAVIS_COMMIT" "phpDoc/$TRAVIS_BRANCH" "gh-pages" || exit 1
|
|
|
|
before_deploy:
|
|
- |
|
|
[ "$DEPLOY_PHPDOC_TAGS" == "true" ] && (
|
|
./build/generate-phpdoc.sh "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR/build/phpdoc-$TRAVIS_TAG" "Pico 1.0 API Documentation ($TRAVIS_TAG)" || exit 1
|
|
./build/deploy-phpdoc.sh "$TRAVIS_REPO_SLUG" "$TRAVIS_BUILD_DIR/build/phpdoc-$TRAVIS_TAG" "$TRAVIS_TAG" "phpDoc/$TRAVIS_TAG" "gh-pages" || exit 1
|
|
)
|
|
- composer install --no-dev --optimize-autoloader
|
|
- tar -czf "pico-release-$TRAVIS_TAG.tar.gz" README.md LICENSE CONTRIBUTING.md CHANGELOG.md composer.json composer.lock config content-sample lib plugins themes vendor .htaccess index.php
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key: ${GITHUB_OAUTH_TOKEN}
|
|
file: pico-release-$TRAVIS_TAG.tar.gz
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|
|
php: 5.3
|
|
|
|
sudo: false
|