unset($local_modules[$type][$name]); } else { // module don't exist locally. mark for removal $module_sync['remove'][$type][] = $name; unset($local_modules[$type][$name]); } } // remaining local modules will be uploaded foreach ($local_modules as $type => $modules) { if (empty($modules)) { continue; } foreach ($modules as $name => $updated_at) { $module_file = $root_directory . '/' . $type . '/' . $name; $module_contents = file_get_contents($module_file); Utils::check_php_syntax($module_file); $module_sync['upload'][$type][$name] = array($module_contents, $updated_at); } } Console::loading_output("Deploying..."); $schedule_data = Utils::parse_yaml($root_directory . '/schedule.yaml'); $schedule = $schedule_data && isset($schedule_data['schedule']) ? $schedule_data['schedule'] : array(); // retrieve application config // compatibility with v0.2.x $config = null; if (file_exists($root_directory . '/config.yaml')) { echo "DEPRECATE WARNING: Please move 'hook-ext/config.yaml' file to 'hook-ext/config/config.yaml'." . PHP_EOL; // TODO: remove on v0.4.x $config = Utils::parse_yaml($root_directory . '/config.yaml'); } else { $config = Utils::parse_yaml($root_directory . '/config/config.yaml');