summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiro Mattia Gonano <ciromattia@gmail.com>2013-07-29 11:26:40 +0200
committerCiro Mattia Gonano <ciromattia@gmail.com>2013-07-29 11:26:40 +0200
commitea20dd1900395dccdc620fba3e2ae73b4694a77c (patch)
treeede6bfcd2cc4c1cb5171201a98584f981c8d2eab
parentf8c254bd96cedf2db6ff083eae325aca588b07e5 (diff)
Add travis phing
-rw-r--r--.travis.yml2
-rwxr-xr-xtravis-phing.sh40
2 files changed, 41 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 19562df3..178d7a0b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,4 +2,4 @@ language: php
php:
- 5.3
- 5.4
-script: "phing test"
+script: "./travis-phing.sh test"
diff --git a/travis-phing.sh b/travis-phing.sh
new file mode 100755
index 00000000..04d86a9f
--- /dev/null
+++ b/travis-phing.sh
@@ -0,0 +1,40 @@
+#!/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
+}
+
+
+#-----------------------------------------------------------
+
+ installPearTask &&
+ echo -e "\nSUCCESS - PHP ENVIRONMENT READY." ||
+ ( echo "=== FAILED."; exit 1 )
+
+ phing $*
+
+#------------------------------------------------------- eof