/** * Get a list of all files that exist on the output side but not on the input side. * * @return array */ public function getFilesToDelete() { $filesToDelete = []; foreach ($this->outputFiles as $file) { if (!$this->input->has($file['path']) && !$this->exclude($file['path'], $this->settings->excludeOutput())) { $filesToDelete[] = $file; } } return $filesToDelete; }
/** * This is a local one. * Just sync and commit then. * * @param SyncContract $sync * @param SyncOutputContract $output * @param LocalOutput $outputHandler * @param SyncSettingsContract $settings */ protected function local(SyncContract &$sync, SyncOutputContract $output, LocalOutput $outputHandler, SyncSettingsContract $settings) { // Set git to local $this->git->local($outputHandler); $this->git->init(); // Override the settings for versioning $settings->setExcludeOutput(array_merge($settings->excludeOutput(), ['.git/**/*', '**/.gitignore', '**/.gitkeep'])); $settings->setDelete(true); $sync->setSettings($settings); }