Fix tests

This commit is contained in:
Anton Medvedev 2017-08-12 16:43:25 +03:00
parent a78fcc0619
commit d288c2d7e2

View File

@ -15,15 +15,12 @@ use Deployer\Exception\RuntimeException;
set('branch', function () {
try {
$branch = runLocally('git rev-parse --abbrev-ref HEAD');
// Fix for Travis-CI
if ($branch === 'HEAD') {
$branch = null;
}
} catch (\Throwable $exception) {
$branch = null;
}
echo $branch;
if (input()->hasOption('branch') && !empty(input()->getOption('branch'))) {
$branch = input()->getOption('branch');
}