vendors.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/env php
  2. <?php
  3. /*
  4. * This file is part of the Symfony framework.
  5. *
  6. * (c) Fabien Potencier <fabien@symfony.com>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. /*
  12. CAUTION: This file installs the dependencies needed to run the Symfony2 test suite.
  13. If you want to create a new project, download the Symfony Standard Edition instead:
  14. http://symfony.com/download
  15. */
  16. if (!is_dir($vendorDir = dirname(__FILE__).'/vendor')) {
  17. mkdir($vendorDir, 0777, true);
  18. }
  19. $deps = array(
  20. array('assetic', 'http://github.com/kriswallsmith/assetic.git', 'origin/HEAD'),
  21. array('doctrine', 'http://github.com/doctrine/doctrine2.git', '2.0.5'),
  22. array('doctrine-dbal', 'http://github.com/doctrine/dbal.git', '2.0.5'),
  23. array('doctrine-common', 'http://github.com/doctrine/common.git', 'origin/3.0.x'),
  24. array('monolog', 'http://github.com/Seldaek/monolog.git', 'origin/HEAD'),
  25. array('swiftmailer', 'http://github.com/swiftmailer/swiftmailer.git', 'origin/4.1'),
  26. array('twig', 'http://github.com/fabpot/Twig.git', 'origin/HEAD'),
  27. );
  28. foreach ($deps as $dep) {
  29. list($name, $url, $rev) = $dep;
  30. echo "> Installing/Updating $name\n";
  31. $installDir = $vendorDir.'/'.$name;
  32. if (!is_dir($installDir)) {
  33. system(sprintf('git clone %s %s', $url, $installDir));
  34. }
  35. system(sprintf('cd %s && git fetch origin && git reset --hard %s', $installDir, $rev));
  36. }