strategies.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /*
  3. * This file is part of Rocketeer
  4. *
  5. * (c) Maxime Fabre <ehtnam6@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. use Rocketeer\Binaries\PackageManagers\Composer;
  11. use Rocketeer\Tasks\Subtasks\Primer;
  12. return [
  13. // Task strategies
  14. //
  15. // Here you can configure in a modular way which tasks to use to
  16. // execute various core parts of your deployment's flow
  17. //////////////////////////////////////////////////////////////////////
  18. // Which strategy to use to check the server
  19. 'check' => 'Php',
  20. // Which strategy to use to create a new release
  21. 'deploy' => 'Clone',
  22. // Which strategy to use to test your application
  23. 'test' => 'Phpunit',
  24. // Which strategy to use to migrate your database
  25. 'migrate' => 'Artisan',
  26. // Which strategy to use to install your application's dependencies
  27. 'dependencies' => 'Composer',
  28. // Execution hooks
  29. //////////////////////////////////////////////////////////////////////
  30. 'composer' => [
  31. 'install' => function (Composer $composer, $task) {
  32. return $composer->install([], ['--no-interaction' => null, '--prefer-dist' => null]);
  33. },
  34. 'update' => function (Composer $composer) {
  35. return $composer->update();
  36. },
  37. ],
  38. // Here you can configure the Primer tasks
  39. // which will run a set of commands on the local
  40. // machine, determining whether the deploy can proceed
  41. // or not
  42. 'primer' => function (Primer $task) {
  43. return [
  44. // $task->executeTask('Test'),
  45. // $task->binary('grunt')->execute('lint'),
  46. ];
  47. },
  48. ];