-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.sh
executable file
·91 lines (75 loc) · 2.64 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
#-----------------------------------------------------------
#
# Purpose: Run phing in a travis environment
#
# Target system: travis-ci
#-----------------------------------------------------------
installPearTask ()
{
echo -e "\nAuto-discover pear channels and upgrade ..."
pear config-set auto_discover 1
pear -qq channel-update pear.php.net
pear -qq upgrade
echo "... OK"
echo -e "\nInstalling / upgrading phing ... "
which phing >/dev/null &&
pear upgrade pear.phing.info/phing ||
pear install --alldeps pear.phing.info/phing
# update paths
phpenv rehash
# re-test for phing:
phing -v 2>&1 >/dev/null &&
echo "... OK" ||
return 1
echo -e "\nInstalling / upgrading phpcpd ... "
which phpcpd >/dev/null &&
pear upgrade pear.phpunit.de/phpcpd ||
pear install pear.phpunit.de/phpcpd
phpenv rehash
echo -e "\nInstalling / upgrading phploc ... "
which phploc >/dev/null &&
pear upgrade pear.phpunit.de/phploc ||
pear install pear.phpunit.de/phploc
phpenv rehash
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" ||
return 1
sudo apt-get install python-docutils
pear install VersionControl_Git-alpha
pear install VersionControl_SVN-alpha
pear install pear/XML_Serializer-beta
pear install --alldeps PEAR_PackageFileManager
pear install --alldeps PEAR_PackageFileManager2
pear install Net_Growl
# update paths
phpenv rehash
}
#-----------------------------------------------------------
installPearTask &&
echo -e "\nSUCCESS - PHP ENVIRONMENT READY." ||
( echo "=== FAILED."; exit 1 )
if [[ $TRAVIS_PHP_VERSION < 5.3 ]]; then
pear install -f phpunit/File_Iterator-1.3.2
pear install -f phpunit/PHP_TokenStream-1.1.4
pear install -f phpunit/PHP_Timer-1.0.3
pear install -f phpunit/Text_Template-1.1.1
else
composer install
fi
# echo "=== BUILDING PHING ==="
# cd build
# phing -Dversion=2.0.0b1
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