Bugfix: Monkeypatch another crazy bug in the packing script

This commit is contained in:
Starbeamrainbowlabs 2019-08-29 20:40:56 +01:00
parent 0a6ee2977d
commit cd4b137efc
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 9 additions and 3 deletions

View File

@ -345,4 +345,4 @@
"ParsedownExtreme.php": "https:\/\/raw.githubusercontent.com\/BenjaminHoegh\/parsedown-extreme\/adae4136534ad1e4159fe04c74c4683681855b84\/ParsedownExtreme.php"
}
}
]
]

View File

@ -1,7 +1,12 @@
<?php
$paths = new stdClass();
$paths->extra_data_directory = "._extra_data";
// If this script is called directly, it must be because of the downloader.
// If this script is to be called directly, it MUST have been called previously
// via build.php at least once first.
if(!isset($paths)) {
$paths = new stdClass();
$paths->extra_data_directory = "build/._extra_data";
}
if(isset($_GET["determine-latest-version"])) {
header("content-type: application/json");
@ -128,6 +133,7 @@ foreach($module_list as $module)
foreach($module->extra_data as $filepath_pack => $extra_data_item) {
if(is_string($extra_data_item)) {
// TODO: Test whether this works for urls. If not, then we'll need to implement a workaround
log_str("\n[pack] $paths->extra_data_directory/$module->id/$filepath_pack -> $module->id/$filepath_pack\n");
$extra_data_archive->addFile("$paths->extra_data_directory/$module->id/$filepath_pack", "$module->id/$filepath_pack");
}
}