mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 08:45:04 +01:00
Refactor deploy:is-unlocked to deploy:is_locked
This commit is contained in:
parent
083a30003d
commit
3105caa1ce
@ -28,10 +28,10 @@ Unlock deploy.
|
||||
|
||||
|
||||
|
||||
### deploy:is-unlocked
|
||||
### deploy:is_locked
|
||||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/lock.php#L25)
|
||||
|
||||
Check if deploy is unlocked.
|
||||
Check if deploy is locked.
|
||||
|
||||
|
||||
|
||||
|
@ -21,12 +21,11 @@ task('deploy:unlock', function () {
|
||||
run("rm -f {{deploy_path}}/.dep/deploy.lock");//always success
|
||||
});
|
||||
|
||||
desc('Check if deploy is unlocked');
|
||||
task('deploy:is-unlocked', function () {
|
||||
desc('Check if deploy is locked');
|
||||
task('deploy:is_locked', function () {
|
||||
$locked = test("[ -f {{deploy_path}}/.dep/deploy.lock ]");
|
||||
if ($locked) {
|
||||
writeln('Deploy is currently locked.');
|
||||
throw new GracefulShutdownException();
|
||||
throw new GracefulShutdownException("Deploy is locked.");
|
||||
}
|
||||
writeln('Deploy is currently unlocked.');
|
||||
info('Deploy is unlocked.');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user