function __construct() { //! check if executed from CLI if (Core::$client->ip != "CLI") { Http::redirect("403"); } //! convert source to deployment format Repository::compress(); //! update document Repository::updateDoc(); }
function __construct() { //! check if executed from CLI if (\PHPPE\Core::$client->ip != "CLI") { die(L("Run from command line") . "\n"); } //! convert source to deployment format \PHPPE\Repository::compress(); //! update document \PHPPE\Repository::updateDoc(); die; }
function __construct() { //! check if executed from CLI if (Core::$client->ip != "CLI") { Http::redirect("403"); } //! run tests if (in_array("--tests", $_SERVER['argv'])) { echo "Running tests: "; ob_start(); $tests = Testing::doTests(); $d = ob_get_clean(); if (!$tests) { die("FAILED\n{$d}"); } echo "OK\n"; unset($d); } //! *** MKREPO Event *** Core::event("mkrepo"); //! create repository Repository::make(); die; }