mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 01:02:24 +01:00
Improve lock message
Prefix launcher script and append current stage.
This commit is contained in:
parent
ac5c1dd1c5
commit
0acbb4c6fb
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user