From b5c7f4d7cbe653c2224cde8bfe3618b6046a2002 Mon Sep 17 00:00:00 2001 From: Said Achmiz Date: Wed, 6 Feb 2019 13:09:57 -0500 Subject: [PATCH] Fixed bugs in build scripts --- build.php | 2 +- util/package.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build.php b/build.php index 20b8acc..fb23c04 100644 --- a/build.php +++ b/build.php @@ -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) { diff --git a/util/package.php b/util/package.php index 8794406..a2fe607 100644 --- a/util/package.php +++ b/util/package.php @@ -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"];