Remove autounlock from common and move to template

This commit is contained in:
Anton Medvedev 2017-01-19 10:47:14 +07:00
parent fbe3cca0c1
commit cbfc652df8
4 changed files with 5 additions and 4 deletions

View File

@ -14,7 +14,6 @@
- Raised timeout for runLocally to 300 seconds [#955](https://github.com/deployphp/deployer/pull/955)
- `deploy:unlock` now always successful [#950](https://github.com/deployphp/deployer/pull/950)
- Added option `-L` to `setfacl` [#956](https://github.com/deployphp/deployer/pull/956)
- Run `deploy:unlock` when deploy is fail [#958](https://github.com/deployphp/deployer/pull/958)
- Now throw exception on duplicates in `shared_dirs`
### Fixed

View File

@ -143,4 +143,3 @@ task('deploy:failed', function () {
})->setPrivate();
onFailure('deploy', 'deploy:failed');
before('deploy:failed', 'deploy:unlock');

View File

@ -63,10 +63,10 @@ task('deploy', [
'deploy:symlink',
'deploy:unlock',
'cleanup',
'success'
]);
after('deploy', 'success');
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
PHP;
}
}

View File

@ -46,6 +46,9 @@ task('php-fpm:restart', function () {
run('sudo systemctl restart php-fpm.service');
});
after('deploy:symlink', 'php-fpm:restart');
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
{$this->getExtraContent()}
PHP;
}