From 243e3334b60a7195fa4d85fd374e145cd7286a47 Mon Sep 17 00:00:00 2001 From: Richard Klees Date: Thu, 25 Jan 2024 17:13:06 +0100 Subject: [PATCH] Component: allow for multiple bootstraps --- cli/build_bootstrap.php | 12 +++++++----- cli/setup.php | 2 +- .../ILIAS/Setup/resources/dependency_resolution.php | 0 composer.json | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) rename dependency_resolution.php => components/ILIAS/Setup/resources/dependency_resolution.php (100%) diff --git a/cli/build_bootstrap.php b/cli/build_bootstrap.php index 30769a4448a0..ccd789e705c6 100755 --- a/cli/build_bootstrap.php +++ b/cli/build_bootstrap.php @@ -29,12 +29,14 @@ INFO; -if (isset($argv[1])) { - $resolution_file = $argv[1]; -} else { - $resolution_file = realpath(__DIR__ . "/../dependency_resolution.php"); +if (count($argv) !== 3) { + die("php cli/build_bootstrap.php \$dependency_resolution \$name"); } +$resolution_file = $argv[1]; +$name = $argv[2]; + + if (!file_exists($resolution_file)) { die("Cannot find resolution file at {$resolution_file}.\n"); } @@ -87,4 +89,4 @@ if (!is_dir(__DIR__ . "/../artifacts")) { mkdir(__DIR__ . "/../artifacts", 0755, true); } -file_put_contents(__DIR__ . "/../artifacts/bootstrap.php", $bootstrap); +file_put_contents(__DIR__ . "/../artifacts/bootstrap_$name.php", $bootstrap); diff --git a/cli/setup.php b/cli/setup.php index fbd091b003e0..46cb277eeaab 100755 --- a/cli/setup.php +++ b/cli/setup.php @@ -15,7 +15,7 @@ * *********************************************************************/ -require_once(__DIR__ . "/../artifacts/bootstrap.php"); +require_once(__DIR__ . "/../artifacts/bootstrap_setup.php"); require_once(__DIR__ . "/../ilias_version.php"); exit(entry_point("The ILIAS Setup")); diff --git a/dependency_resolution.php b/components/ILIAS/Setup/resources/dependency_resolution.php similarity index 100% rename from dependency_resolution.php rename to components/ILIAS/Setup/resources/dependency_resolution.php diff --git a/composer.json b/composer.json index 8851a50e1e5a..c295b520b87c 100755 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ }, "scripts": { "post-autoload-dump": [ - "@php cli/build_bootstrap.php", + "@php cli/build_bootstrap.php components/ILIAS/Setup/resources/dependency_resolution.php setup", "@php cli/setup.php build-artifacts --yes" ], "post-install-cmd": [