Permalink
Browse files

Add vendors script for window CI

  • Loading branch information...
romainneutron committed Apr 17, 2012
1 parent e10bd69 commit 6eaf35931b93f20193cfbe70db2eddbd9a5f408a
Showing with 38 additions and 0 deletions.
  1. +38 −0 vendors.win.php
View
@@ -0,0 +1,38 @@
+<?php
+
+/*
+ * This file is largely inspired by the one written for the Symfony framework.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * 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');
+ });
+

0 comments on commit 6eaf359

Please sign in to comment.