From 2b32688d3cd2b4e19b43cbb3ee75d392ca78352f Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 17 Apr 2012 20:32:30 +0200 Subject: [PATCH] Add vendors script for window CI --- vendors.win.php | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 vendors.win.php diff --git a/vendors.win.php b/vendors.win.php new file mode 100644 index 0000000..6eef18b --- /dev/null +++ b/vendors.win.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Get all dependencies needed for Phraseanet (Windows Version) + * + * Set the variables gitDir and phpDir with a trailing slash if it is not set in Windows' %PATH% + * For example : + * $phpDir="c:/php5310/" + */ +call_user_func(function() + { + $phpDir = ""; + + chdir(__DIR__); + + set_time_limit(0); + + $composer = __DIR__ . '/composer.phar'; + + if ( ! file_exists($composer)) + { + file_put_contents($composer, file_get_contents('http://getcomposer.org/installer'), LOCK_EX); + system($phpDir . 'php ' . $composer . ' install'); + } + + system($phpDir . 'php ' . $composer . ' self-update'); + system($phpDir . 'php ' . $composer . ' update'); + }); +