Fixed bugs in build scripts

This commit is contained in:
Said Achmiz 2019-02-06 13:09:57 -05:00
parent f9cad74bd8
commit b5c7f4d7cb
2 changed files with 6 additions and 2 deletions

View File

@ -15,7 +15,7 @@ if ($argc < 2) {
}
## Determine path to repository root.
$root = preg_replace('/\/[^\/]+$/', '', dirname(__FILE__));
$root = dirname(__FILE__);
## Determine what platforms are available.
$platforms = array_filter(scandir("{$root}/src/platform/"), function ($str) {

View File

@ -2,14 +2,18 @@
$root = preg_replace('/\/[^\/]+$/', '', dirname(__FILE__));
if ($argv[1] == "-b")
if ($argv[1] == "-b") {
$argv[1] = "all";
include_once("{$root}/build.php");
}
$platforms = array_filter(scandir("{$root}/src/platform/"), function ($str) {
return strncmp($str, ".", 1);
});
foreach ($platforms as $platform) {
echo "Packaging for: {$platform}\n";
$manifest = JSON_decode(file_get_contents("{$root}/build/{$platform}/manifest.json"), true);
$version = $manifest["version"];