forked from phingofficial/phing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.sh
executable file
·71 lines (59 loc) · 2.46 KB
/
.travis.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
#-----------------------------------------------------------
#
# Purpose: Run phing in a travis environment
#
# Target system: travis-ci
#-----------------------------------------------------------
if [[ $TRAVIS_PHP_VERSION != 'hhvm-nightly' && $TRAVIS_PHP_VERSION != 'hhvm' ]]; then
echo -e "\nAuto-discover pear channels and upgrade ..."
pear config-set auto_discover 1
pear -qq channel-update pear.php.net
pear -qq channel-discover pear.phing.info
echo "... OK"
fi
if [[ $TRAVIS_PHP_VERSION < 5.3 ]]; then
pear upgrade pecl.php.net/Phar ||
pear install pecl.php.net/Phar
echo -e "\nInstalling / upgrading phpcs ... "
which phpcs >/dev/null &&
pear upgrade pear.php.net/PHP_CodeSniffer ||
pear install pear.php.net/PHP_CodeSniffer
phpenv rehash
# re-test for phpcs:
phpcs --version 2>&1 >/dev/null &&
echo "... OK"
echo -e "\nInstalling / upgrading phpdepend ... "
which pdepend >/dev/null &&
pear upgrade pear.pdepend.org/PHP_Depend-1.1.0 ||
pear install pear.pdepend.org/PHP_Depend-1.1.0
echo -e "\nInstalling PEAR packages ... "
pear install pear/XML_Serializer-beta
pear install --alldeps PEAR_PackageFileManager
pear install --alldeps PEAR_PackageFileManager2
pear install Net_Growl
pear install HTTP_Request2
pear install VersionControl_SVN-alpha
pear install VersionControl_Git-alpha
mkdir vendor
touch vendor/autoload.php
else
echo -e "\nInstalling composer packages ... "
composer selfupdate --quiet
composer install -o --no-progress --prefer-dist --ignore-platform-reqs
fi
if [[ $TRAVIS_PHP_VERSION != 'hhvm-nightly' && $TRAVIS_PHP_VERSION != 'hhvm' ]]; then
phpenv config-add .travis.php.ini
else
echo "hhvm.libxml.ext_entity_whitelist = file" >> /etc/hhvm/php.ini
phpenv rehash
echo "hhvm.libxml.ext_entity_whitelist = file" >> /etc/hhvm/php.ini
fi
phpenv rehash
echo "=== SETTING GIT IDENTITY ==="
git config --global user.email "[email protected]"
git config --global user.name "Phing Travis Builder"
echo "=== TESTING PHING ==="
cd test
../bin/phing
#------------------------------------------------------- eof