Change api generation and localization scripts to work with swift modules

This commit is contained in:
Victor Shabanov 2019-10-17 15:42:36 +03:00
parent 432bb8a67b
commit 1d04958271
3 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<?php
$PROJECT_NAME = $argv[1];
$PRODUCT_NAME = $argv[1];
$COMMON_STRINGS_PATH = $argv[2];
function createFolder($path) {
@ -8,7 +8,7 @@
}
}
$localization = './'.$PROJECT_NAME.'/Resources/Localization/';
$localization = './'.$PRODUCT_NAME.'/Resources/Localization/';
$baseFile = file_get_contents(array_pop(glob($COMMON_STRINGS_PATH.'/default*.json')));
$baseJson = json_decode($baseFile, true);

View File

@ -6,4 +6,4 @@ link="https://dl.bintray.com/touchin/touchin-tools/ru/touchin/api-generator/${VE
. build-scripts/xcode/aux_scripts/download_file.sh ${FILE_NAME} ${link}
# execute api generator
java -jar "Downloads/${FILE_NAME}" generate-client-code --output-language SWIFT --specification-path common/api --output-path ${PROJECT_NAME}/Generated --single-file true
java -jar "Downloads/${FILE_NAME}" generate-client-code --output-language SWIFT --specification-path common/api --output-path ${PRODUCT_NAME}/Generated --single-file true

View File

@ -1,4 +1,4 @@
LOCALIZATION_PATH="${PROJECT_NAME}/Resources/Localization"
LOCALIZATION_PATH="${PRODUCT_NAME}/Resources/Localization"
#first argument set strings folder path
STRINGS_FOLDER=${1:-"common/strings"}
@ -13,4 +13,4 @@ if ! [ -e "${PROJECT_DIR}/${STRINGS_FOLDER}" ]; then
fi
#second argument set strings script path
php ${2:-build-scripts/xcode/aux_scripts/import_strings.php} ${PROJECT_NAME} ${STRINGS_FOLDER}
php ${2:-build-scripts/xcode/aux_scripts/import_strings.php} ${PRODUCT_NAME} ${STRINGS_FOLDER}