<?php /** * Create the scaffolding for a new component, including the component.xml, Models, Controllers, and all directories. */ if(!isset($_SERVER['SHELL'])){ die("Please run this script from the command line."); } define('ROOT_PDIR', realpath(dirname(__DIR__) . '/src/') . '/'); define('BASE_DIR', realpath(dirname(__DIR__)) . '/'); // Include the core bootstrap, this will get the system functional. require_once(ROOT_PDIR . 'core/bootstrap.php'); \Core\CLI\CLI::RequireEditor(); // I need a few variables first about the user... $packagername = ''; $packageremail = ''; \Core\CLI\CLI::LoadSettingsFile('packager'); if(!$packagername){ $packagername = \Core\CLI\CLI::PromptUser('Please provide your name you wish to use for packaging', 'text-required'); } if(!$packageremail){ $packageremail = \Core\CLI\CLI::Promptuser('Please provide your email you wish to use for packaging.', 'text-required'); }
} if($arguments->getArgumentValue('repackage')){ $opts['repackage'] = true; } if($arguments->getArgumentValue('list')){ $opts['listonly'] = true; $opts['listversions'] = true; $opts['quiet'] = true; } // I need a valid editor. CLI::RequireEditor(); // Some cache variables. $_cversions = null; /** * Simple function to intelligently "up" the version number. * Supports Ubuntu-style versioning for non-original maintainers (~extraversionnum) * * Will try to utilize the versioning names, ie: dev to alpha to beta, etc. * * @param string $version * @param boolean $original * @return string */