Skip to content

Commit

Permalink
Fix laravel recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
oanhnn committed Apr 13, 2016
1 parent 4b48e5d commit 94b088a
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions recipe/laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,27 @@
// This recipe support Laravel 5.1+, with orther version, please see document https://github.com/deployphp/docs

// Laravel shared dirs
set('shared_dirs', [
'storage/app',
'storage/framework/cache',
'storage/framework/sessions',
'storage/framework/views',
'storage/logs',
]);
set('shared_dirs', ['storage']);

// Laravel 5 shared file
set('shared_files', ['.env']);

// Laravel writable dirs
set('writable_dirs', ['bootstrap/cache', 'storage']);

/**
* Helper tasks
*/
task('deploy:up', function () {
$output = run('{{bin/php}} {{deploy_path}}/current/artisan up');
writeln('<info>'.$output.'</info>');
})->desc('Disable maintenance mode');

task('deploy:down', function () {
$output = run('{{bin/php}} {{deploy_path}}/current/artisan down');
writeln('<error>'.$output.'</error>');
})->desc('Enable maintenance mode');

/**
* Main task
*/
Expand All @@ -32,21 +39,9 @@
'deploy:update_code',
'deploy:vendors',
'deploy:shared',
'deploy:writable',
'deploy:symlink',
'cleanup',
])->desc('Deploy your project');

after('deploy', 'success');

/**
* Helper tasks
*/
task('deploy:up', function () {
$output = run('php {{deploy_path}}/current/artisan up');
writeln('<info>'.$output.'</info>');
})->desc('Disable maintenance mode');

task('deploy:down', function () {
$output = run('php {{deploy_path}}/current/artisan down');
writeln('<error>'.$output.'</error>');
})->desc('Enable maintenance mode');

0 comments on commit 94b088a

Please sign in to comment.