From 7b887da666d7e886810bb303770805bb44debe30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Runkel?= Date: Wed, 11 Apr 2018 22:09:27 +0200 Subject: [PATCH 1/3] Do not delete but move ios platform for debugging purposes --- cordova.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cordova.sh b/cordova.sh index 0cbce5c..ceae389 100755 --- a/cordova.sh +++ b/cordova.sh @@ -91,7 +91,8 @@ if [ "$BUILD_APK" == 'true' ]; then mkdir www rm -rf plugins/* rm -rf platforms/android - rm -rf platforms/ios + mkdir platforms_debug + mv platforms/ios platforms_debug/ git checkout config.xml sed -i '' "s/ Date: Tue, 19 Jun 2018 00:01:46 +0200 Subject: [PATCH 2/3] optionally copy resource files from deploy/resource-files to cordova root dir --- cordova.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cordova.sh b/cordova.sh index ceae389..e221709 100755 --- a/cordova.sh +++ b/cordova.sh @@ -52,6 +52,22 @@ else exit 1 fi +# Copy resource-files +RESOURCES_DIR="$WORKSPACE/deploy/resource-files/" +RESOURCES_FILES="$RESOURCES_DIR*.$CONFIG" + +if [ -d "$RESOURCES_DIR" ]; then + if compgen -G "$RESOURCES_FILES" > /dev/null; then + echo "Copying resource files from $RESOURCES_FILES to cordova root dir..." + for f in ${RESOURCES_FILES}; do + [ -e "$f" ] || continue + target_filename="$(basename "$f" .$CONFIG)" + echo "... copy ${f##*/} to $CORDOVA_APP_DIR$target_filename" + cp "$f" "$CORDOVA_APP_DIR$target_filename" + done + fi +fi + export PATH=$PATH:/opt/local/bin export LANG=de_DE.UTF-8 -- GitLab From 00b6114ff19b6ee8d306e1d0265ba6a89c8d8db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Runkel?= Date: Tue, 19 Jun 2018 00:21:39 +0200 Subject: [PATCH 3/3] fix copy resources --- cordova.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cordova.sh b/cordova.sh index e221709..97f8067 100755 --- a/cordova.sh +++ b/cordova.sh @@ -62,8 +62,8 @@ if [ -d "$RESOURCES_DIR" ]; then for f in ${RESOURCES_FILES}; do [ -e "$f" ] || continue target_filename="$(basename "$f" .$CONFIG)" - echo "... copy ${f##*/} to $CORDOVA_APP_DIR$target_filename" - cp "$f" "$CORDOVA_APP_DIR$target_filename" + echo "... copy ${f##*/} to $CORDOVA_APP_DIR/$target_filename" + cp "$f" "$CORDOVA_APP_DIR/$target_filename" done fi fi -- GitLab