Improve lock message

Prefix launcher script and append current stage.
This commit is contained in:
Mathias Brodala 2017-04-05 15:02:19 +02:00
parent ac5c1dd1c5
commit 0acbb4c6fb

View File

@ -14,9 +14,11 @@ task('deploy:lock', function () {
$locked = run("if [ -f {{deploy_path}}/.dep/deploy.lock ]; then echo 'true'; fi")->toBool();
if ($locked) {
$stage = input()->hasArgument('stage') ? ' ' . input()->getArgument('stage') : '';
throw new GracefulShutdownException(
"Deploy locked.\n" .
"Run deploy:unlock command to unlock."
sprintf('Execute "dep deploy:unlock%s" to unlock.', $stage)
);
} else {
run("touch {{deploy_path}}/.dep/deploy.lock");