mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
19 lines
465 B
PHP
19 lines
465 B
PHP
|
<?php
|
||
|
/* (c) Anton Medvedev <anton@medv.io>
|
||
|
*
|
||
|
* For the full copyright and license information, please view the LICENSE
|
||
|
* file that was distributed with this source code.
|
||
|
*/
|
||
|
|
||
|
namespace Deployer;
|
||
|
|
||
|
desc('Cleaning up files and/or directories');
|
||
|
task('deploy:clear_paths', function () {
|
||
|
$paths = get('clear_paths');
|
||
|
$sudo = get('clear_use_sudo') ? 'sudo' : '';
|
||
|
|
||
|
foreach ($paths as $path) {
|
||
|
run("$sudo rm -rf {{release_path}}/$path");
|
||
|
}
|
||
|
});
|