Merge pull request #168 from TouchInstinct/fix/issue_167_Validation_json

[Issue 167] faild build if json localization is null
This commit is contained in:
Mihail 2020-03-12 15:37:36 +03:00 committed by GitHub
commit da6ba70750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,7 @@
mkdir($path, 0777, true);
}
}
$localization = './'.$PRODUCT_NAME.'/Resources/Localization/';
$baseFile = file_get_contents(array_pop(glob($COMMON_STRINGS_PATH.'/default*.json')));
@ -19,6 +19,11 @@
$jsonFile = file_get_contents($file);
$json = array_merge($baseJson, json_decode($jsonFile, true));
if ($json == null) {
echo "Invalid JSON format\n";
exit(1);
}
$ios_strings = "";
foreach ($json as $key=>$value) {