Skip to content

Commit

Permalink
Component: allow for multiple bootstraps
Browse files Browse the repository at this point in the history
  • Loading branch information
klees committed Feb 6, 2024
1 parent 1e1b183 commit 552566d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions cli/build_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -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);
2 changes: 1 addition & 1 deletion cli/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
File renamed without changes.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit 552566d

Please sign in to comment.