public function saveDefinitionForPlugin($pluginFile) { $pluginSlug = basename(dirname($pluginFile)); $actionsFile = WP_PLUGIN_DIR . '/' . $pluginSlug . '/.versionpress/actions.yml'; if (!is_file($actionsFile)) { return; } $targetFile = $this->getDefinitionFileName($pluginSlug); FileSystem::copy($actionsFile, $targetFile); }
/** * Installs Gitignore to the repository root, or does nothing if the file already exists. */ private function installGitignore() { FileSystem::copy(__DIR__ . '/.gitignore.tpl', ABSPATH . '.gitignore', false); }