Check for /current/artisan existance instead of just /current

This commit is contained in:
Vic D'Elfant 2016-10-11 18:08:55 +02:00
parent 3d25d95ede
commit d9ff7e358f

View File

@ -22,12 +22,12 @@ set('writable_dirs', ['bootstrap/cache', 'storage']);
* Helper tasks
*/
task('artisan:up', function () {
$output = run('if [ -d {{deploy_path}}/current ]; then {{bin/php}} {{deploy_path}}/current/artisan up; fi');
$output = run('if [ -f {{deploy_path}}/current/artisan ]; then {{bin/php}} {{deploy_path}}/current/artisan up; fi');
writeln('<info>' . $output . '</info>');
})->desc('Disable maintenance mode');
task('artisan:down', function () {
$output = run('if [ -d {{deploy_path}}/current ]; then {{bin/php}} {{deploy_path}}/current/artisan down; fi');
$output = run('if [ -f {{deploy_path}}/current/artisan ]; then {{bin/php}} {{deploy_path}}/current/artisan down; fi');
writeln('<error>' . $output . '</error>');
})->desc('Enable maintenance mode');