2016-11-19 15:13:32 +07:00
|
|
|
<?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('Creating symlink to release');
|
|
|
|
task('deploy:symlink', function () {
|
2017-03-13 15:13:34 +07:00
|
|
|
if (get('use_atomic_symlink')) {
|
2016-11-19 15:13:32 +07:00
|
|
|
run("mv -T {{deploy_path}}/release {{deploy_path}}/current");
|
|
|
|
} else {
|
|
|
|
// Atomic symlink does not supported.
|
|
|
|
// Will use simple≤ two steps switch.
|
|
|
|
|
|
|
|
run("cd {{deploy_path}} && {{bin/symlink}} {{release_path}} current"); // Atomic override symlink.
|
|
|
|
run("cd {{deploy_path}} && rm release"); // Remove release link.
|
|
|
|
}
|
|
|
|
});
|