Skip to content
Snippets Groups Projects

Issue #3409491 add composer dependencies in conversion script

1 file
+ 14
5
Compare changes
  • Side-by-side
  • Inline
@@ -40,6 +40,10 @@ class ConverterCommand extends Command {
private string $contrib_dir;
private bool $no_commit;
private bool $skipCoreChecks;
/**
* @inheritDoc
*/
@@ -51,6 +55,7 @@ class ConverterCommand extends Command {
$this->core_target_branch = $input->getOption('core_target_branch');
$this->contrib_dir = realpath(__DIR__ . '/../..');
$this->skipCoreChecks = $input->getOption('skip_core_checks');
$this->no_commit = $input->getOption('no_commit');
// Esnure core_dir is a directory.
if (!is_dir($this->core_dir)) {
throw new \Exception("$this->core_dir is not a directory.");
@@ -126,6 +131,7 @@ class ConverterCommand extends Command {
$this->addOption('package_manager_only', NULL, InputOption::VALUE_NONE, 'Only convert package manager');
$this->addOption('core_target_branch', NULL, InputOption::VALUE_REQUIRED, 'The core target branch', '11.x');
$this->addOption('skip_core_checks', NULL, InputOption::VALUE_NONE, 'Skip core checks');
$this->addOption('no_commit', NULL, InputOption::VALUE_NONE, 'Do not make commit');
}
/**
@@ -243,11 +249,14 @@ class ConverterCommand extends Command {
static::runCoreChecks($this->core_dir);
self::info('Ran core checks');
}
static::doMakeCommit($this->core_dir);
self::info('Make commit');
self::info("Done. Probably good but you should check before you push. These are the files present in the contrib module absent in core:");
print shell_exec(sprintf("tree %s/package_manager > /tmp/contrib.txt && tree %s/core/modules/package_manager > /tmp/core.txt && diff /tmp/contrib.txt /tmp/core.txt", self::getContribDir(), $this->core_dir));
self::info('(Run diff /tmp/contrib.txt /tmp/core.txt to see that with color.');
if (!$this->no_commit) {
static::doMakeCommit($this->core_dir);
self::info('Make commit');
self::info("Done. Probably good but you should check before you push. These are the files present in the contrib module absent in core:");
print shell_exec(sprintf("tree %s/package_manager > /tmp/contrib.txt && tree %s/core/modules/package_manager > /tmp/core.txt && diff /tmp/contrib.txt /tmp/core.txt", self::getContribDir(), $this->core_dir));
self::info('(Run diff /tmp/contrib.txt /tmp/core.txt to see that with color.');
}
}
/**
Loading