Skip to content

Commit

Permalink
Merge pull request #18 from xel1045/master
Browse files Browse the repository at this point in the history
[Fix #2 #15] Allow to specify the config file location & A macro should stop if one of its task fails
  • Loading branch information
tomzx committed Sep 25, 2015
2 parents e511bdc + 2b8a24a commit e60dba0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Envoy.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@setup
$baseCwd = isset($__current_cwd) ? $__current_cwd : getcwd();
$configFile = $baseCwd.'/app/config/deploy.php';
$baseCwd = isset($__current_cwd) ? $__current_cwd : getcwd();
$configFile = $baseCwd .'/'. (isset($configFile) ? $configFile : 'app/config/deploy.php');

if ( ! file_exists($configFile)) {
throw new Exception('Config file app/config/deploy.php not found.');
throw new Exception('Config file '. $configFile .' not found.');
}

$deployConfig = include($configFile);
Expand Down Expand Up @@ -282,6 +282,8 @@
@error
if ($task === 'deploy:check') {
throw new Exception('Unmet prerequisites to deploy. Have you run deploy:setup?');
} else {
throw new Exception('Whoops, looks like something went wrong');
}
@enderror

Expand Down

0 comments on commit e60dba0

Please sign in to comment.