Allow to start Deployer console app if there are no deploy.php file.

This commit is contained in:
Elfet 2014-07-07 17:44:06 +04:00
parent c92a022053
commit 6a673a7bd2

10
bin/dep
View File

@ -27,9 +27,6 @@ if (!$loaded) {
// Recipe include path
set_include_path(__DIR__ . '/../');
$deployFile = getcwd() . '/deploy.php';
if (is_file($deployFile) && is_readable($deployFile)) {
// Init Deployer
$deployer = new \Deployer\Deployer(
new \Symfony\Component\Console\Application('Deployer', '__VERSION__'),
@ -38,7 +35,11 @@ if (is_file($deployFile) && is_readable($deployFile)) {
);
// Require current deploy.php script
$deployFile = getcwd() . '/deploy.php';
if (is_file($deployFile) && is_readable($deployFile)) {
require $deployFile;
}
// Self-update command
$selfUpdate = new \KevinGH\Amend\Command('self-update');
@ -49,6 +50,3 @@ if (is_file($deployFile) && is_readable($deployFile)) {
// Run Deployer
$deployer->run();
} else {
echo "deploy.php file does not found.\n";
}