Skip to content
Snippets Groups Projects
Commit 26e6c90b authored by Ted Bowman's avatar Ted Bowman
Browse files

change order

parent b6fccb7c
No related branches found
No related tags found
1 merge request!967Issue #3391715: Change core merge request converter to either produce the Package Manager only MR or with AutoUpdates
...@@ -73,9 +73,26 @@ class Converter { ...@@ -73,9 +73,26 @@ class Converter {
$fs->mirror(self::getContribDir(), $core_module_path); $fs->mirror(self::getContribDir(), $core_module_path);
self::info('Mirrored into core module'); self::info('Mirrored into core module');
$replacements = [
$old_machine_name => $new_machine_name,
'AutomaticUpdates' => 'AutoUpdates',
'use Drupal\package_manager\Error;' => 'use Drupal\Core\Utility\Error;',
];
foreach ($replacements as $search => $replace) {
static::renameFiles(static::getDirContents($core_module_path), $search, $replace);
static::replaceContents(static::getDirContents($core_module_path, TRUE), $search, $replace);
}
self::info('Replacements done.');
static::removeLines($core_dir);
self::info('Remove unneeded lines');
self::moveScripts($core_dir, $core_module_path);
self::info('Moved scripts');
// Remove unneeded. // Remove unneeded.
$removals = [ $removals = [
'automatic_updates_extensions', 'auto_updates_extensions',
'drupalci.yml', 'drupalci.yml',
'README.md', 'README.md',
'.cspell.json', '.cspell.json',
...@@ -99,27 +116,13 @@ class Converter { ...@@ -99,27 +116,13 @@ class Converter {
// Replace in file names and contents. // Replace in file names and contents.
static::replaceContents( static::replaceContents(
[ [
new \SplFileInfo("$core_module_path/automatic_updates.info.yml"), new \SplFileInfo("$core_module_path/auto_updates.info.yml"),
new \SplFileInfo("$core_module_path/package_manager/package_manager.info.yml"), new \SplFileInfo("$core_module_path/package_manager/package_manager.info.yml"),
], ],
"core_version_requirement: ^10", "core_version_requirement: ^10",
"package: Core\nversion: VERSION\nlifecycle: experimental", "package: Core\nversion: VERSION\nlifecycle: experimental",
); );
$replacements = [
$old_machine_name => $new_machine_name,
'AutomaticUpdates' => 'AutoUpdates',
'use Drupal\package_manager\Error;' => 'use Drupal\Core\Utility\Error;',
];
foreach ($replacements as $search => $replace) {
static::renameFiles(static::getDirContents($core_module_path), $search, $replace);
static::replaceContents(static::getDirContents($core_module_path, TRUE), $search, $replace);
}
self::info('Replacements done.');
static::removeLines($core_dir);
self::info('Remove unneeded lines');
self::moveScripts($core_dir, $core_module_path);
self::info('Moved scripts');
$fs->rename("$core_module_path/package_manager", $package_manager_core_path); $fs->rename("$core_module_path/package_manager", $package_manager_core_path);
self::info('Move package manager'); self::info('Move package manager');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment