*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Deployer;
task('deploy:info', function () {
$what = '';
$branch = get('branch');
if (!empty($branch)) {
$what = "$branch";
}
if (input()->hasOption('tag') && !empty(input()->getOption('tag'))) {
$tag = input()->getOption('tag');
$what = "tag $tag";
} elseif (input()->hasOption('revision') && !empty(input()->getOption('revision'))) {
$revision = input()->getOption('revision');
$what = "revision $revision";
}
if (empty($what)) {
$what = "HEAD";
}
writeln("✈︎ Deploying $what on {{hostname}}");
})
->shallow()
->setPrivate();