/**
  * Load a file or its contents if a folder.
  *
  * @param string $handle
  */
 protected function loadFileOrFolder($handle)
 {
     // Bind ourselves into the facade to avoid automatic resolution
     Facades\Rocketeer::setFacadeApplication($this->app);
     // If we have one unified tasks file, include it
     $file = $this->app['path.rocketeer.' . $handle];
     if (!is_dir($file) && file_exists($file) && $file !== 'strategies.php') {
         include $file;
     } elseif (is_dir($file)) {
         $folder = glob($file . DS . '*.php');
         foreach ($folder as $file) {
             include $file;
         }
     }
 }
 /**
  * Boot the plugin
  *
  * @return void
  */
 public function boot()
 {
     Rocketeer::plugin('Tnarik\\RocketeerEnvironment\\RocketeerEnvironment');
 }
 /**
  * Load a file or its contents if a folder
  *
  * @param Container $app
  * @param string    $handle
  *
  * @return Container
  */
 protected function loadFileOrFolder(Container $app, $handle)
 {
     // Bind ourselves into the facade to avoid automatic resolution
     Facades\Rocketeer::setFacadeApplication($app);
     // If we have one unified tasks file, include it
     $file = $app['path.rocketeer.' . $handle];
     if (!is_dir($file) and file_exists($file)) {
         include $file;
     } elseif (is_dir($file)) {
         $folder = glob($file . '/*.php');
         foreach ($folder as $file) {
             include $file;
         }
     }
     return $app;
 }
 /**
  * Boot the plugin
  *
  * @return void
  */
 public function boot()
 {
     Rocketeer::plugin('Rocketeer\\Plugins\\Campfire\\RocketeerCampfire');
 }
 /**
  * Boot the plugin
  *
  * @return void
  */
 public function boot()
 {
     Rocketeer::plugin('Rocketeer\\Plugins\\Irc\\RocketeerIrc');
 }
 /**
  * Boot the plugin
  *
  * @return void
  */
 public function boot()
 {
     Rocketeer::plugin('Rocketeer\\Plugins\\Slack\\RocketeerSlack');
 }
Example #7
0
<?php

use Rocketeer\Facades\Rocketeer;
Rocketeer::task('uploads_pull', function ($task) {
}, 'Pull uploads folder from remote server');
Rocketeer::task('uploads_push', function ($task) {
}, 'Push uploads folder to remote server');
Example #8
0
<?php

use Rocketeer\Facades\Rocketeer;
Rocketeer::task('db_pull', function ($task) {
}, 'Pull database from remote server');
Rocketeer::task('db_push', function ($task) {
}, 'Push database to remote server');
 /**
  * Boot the plugin
  *
  * @return void
  */
 public function boot()
 {
     Rocketeer::plugin('Tnarik\\RocketeerDatabase\\RocketeerDatabase');
 }
Example #10
0
<?php

use Rocketeer\Facades\Rocketeer;
Rocketeer::task('assets', function ($task) {
    $theme_name = 'sage';
    $theme_path = $task->releasesManager->getCurrentReleasePath('web/app/themes/' . $theme_name);
    $theme_exists = $task->fileExists($theme_path);
    $stage = $task->connections->getStage();
    if ($theme_exists) {
        $task->command->info('Theme exists.');
        if ($stage == 'production') {
            $gulp = 'gulp --production';
        } else {
            $gulp = "gulp";
        }
        return $task->runForCurrentRelease(['cd ' . $theme_path, 'composer install', 'npm install', 'bower install', $gulp]);
    } else {
        $task->command->error('Theme does not exist.');
    }
}, 'Compile assets on the server');
<?php

use Rocketeer\Facades\Rocketeer;
Rocketeer::listenTo('deploy.before-symlink', function ($task) {
    $currentRelease = $task->runForCurrentRelease('pwd');
    $installationRoot = dirname(dirname($currentRelease));
    $shared = $installationRoot . '/shared';
    /*
     * Make localsettings available for the Gruntfile in current release
     */
    $task->run('ln -s ' . $shared . '/localsettings.json ' . $currentRelease . '/localsettings.json');
    /*
     * Make sure Wordpress is installed and setup
     */
    $task->runForCurrentRelease('grunt wp-install');
    $task->runForCurrentRelease('grunt wp-setup');
    $task->runForCurrentRelease('grunt wp-import');
});
Example #12
0
<?php

use Rocketeer\Facades\Rocketeer;
$listeners = ['node_modules/.bin/tsd update --overwrite', 'node_modules/.bin/bower install --allow-root', 'node_modules/.bin/grunt'];
Rocketeer::listenTo('deploy.before-symlink', $listeners);
Rocketeer::listenTo('update.after', $listeners);
Example #13
0
 public function testCanUseFacadeOutsideOfLaravel()
 {
     Rocketeer::before('deploy', 'ls');
     $before = Rocketeer::getTasksListeners('deploy', 'before', true);
     $this->assertEquals(array('ls'), $before);
 }