mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 00:32:25 +01:00
Fix code style
This commit is contained in:
parent
91fbb66b0f
commit
9ae2b96c23
@ -21,7 +21,7 @@ Lock deploy.
|
||||
|
||||
|
||||
### deploy:unlock
|
||||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/lock.php#L22)
|
||||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/lock.php#L21)
|
||||
|
||||
Unlock deploy.
|
||||
|
||||
@ -29,7 +29,7 @@ Unlock deploy.
|
||||
|
||||
|
||||
### deploy:is-unlocked
|
||||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/lock.php#L27)
|
||||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/lock.php#L26)
|
||||
|
||||
Check if deploy is unlocked.
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Deployer;
|
||||
|
||||
use Deployer\Exception\GracefulShutdownException;
|
||||
use Deployer\Exception\RunException;
|
||||
|
||||
desc('Lock deploy');
|
||||
task('deploy:lock', function () {
|
||||
$locked = test("[ -f {{deploy_path}}/.dep/deploy.lock ]");
|
||||
|
||||
if ($locked) {
|
||||
throw new GracefulShutdownException(
|
||||
"Deploy locked.\n" .
|
||||
@ -26,12 +25,9 @@ task('deploy:unlock', function () {
|
||||
desc('Check if deploy is unlocked');
|
||||
task('deploy:is-unlocked', function () {
|
||||
$locked = test("[ -f {{deploy_path}}/.dep/deploy.lock ]");
|
||||
|
||||
if ($locked) {
|
||||
writeln( 'Deploy is currently locked.');
|
||||
|
||||
writeln('Deploy is currently locked.');
|
||||
throw new GracefulShutdownException();
|
||||
}
|
||||
|
||||
writeln( 'Deploy is currently unlocked.');
|
||||
writeln('Deploy is currently unlocked.');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user