* * @var string */ define('ROOT', __DIR__ . DIRECTORY_SEPARATOR); require_once ROOT . 'Deployer.php'; mb_internal_encoding('UTF-8'); Deployer::registerAutoload(); // Show version info if (isset($argv[1]) && $argv[1] == '--version') { printHeader(); \Deployer\CLI::writeln(array(array('Version: ' . Deployer::VERSION . ', '))); return; } // Run deployer if (sizeof($argv) == 3 && $argv[1] == '-f') { Deployer::factory($argv[2])->execute()->report(); return; } // Show help information printHeader(); \Deployer\CLI::writeln(); \Deployer\CLI::writeln('Usage:'); \Deployer\CLI::writeln(' php deployer.phar -f /path/to/file.json'); /** * Prints Deployer header to Command Line * * @return void */ function printHeader() { \Deployer\CLI::writeln(array(array('Deployer', \Deployer\CLI::FG_GREEN), array(': Command Line tool for remote deploying. ')));