From 146974f4facc4407e7fea18bb85344cc445b9eb4 Mon Sep 17 00:00:00 2001 From: Ethan Neff Date: Thu, 17 Aug 2017 09:36:32 -0700 Subject: [PATCH] fix: corrected testbed init with latest cordova --- testbed/config.template.xml | 4 ++-- testbed/init.sh | 24 ++++++++---------------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/testbed/config.template.xml b/testbed/config.template.xml index 46e20674..7dadbad6 100644 --- a/testbed/config.template.xml +++ b/testbed/config.template.xml @@ -2,8 +2,8 @@ - - + + diff --git a/testbed/init.sh b/testbed/init.sh index dcf10cce..60364e84 100755 --- a/testbed/init.sh +++ b/testbed/init.sh @@ -52,12 +52,6 @@ options() { main() { # clean - if [[ "$run_cor" == "true" ]]; then - npm install -g cordova gulp-cli ios-deploy - fi - if [[ "$run_dep" == "true" ]]; then - npm uninstall mkpath node-version-compare plist xml2js - fi rm -rf ../.installed rm -rf ./node_modules rm -rf ./plugins @@ -67,6 +61,13 @@ main() { rm -rf ./package.json rm -rf ./package-lock.json + if [[ "$run_cor" == "true" ]]; then + npm install -g cordova gulp-cli ios-deploy + fi + if [[ "$run_dep" == "true" ]]; then + npm uninstall mkpath node-version-compare plist xml2js + fi + # validate gulp prod @@ -79,19 +80,10 @@ main() { fi if [[ "$run_and" == "true" ]]; then cordova platform add android - # TODO: remove for cordova 6.5.0 - cordova platform update android@6.2.2 fi - # TODO: remove this cordova error fix (https://stackoverflow.com/questions/42350505/error-cannot-read-property-replace-of-undefined-when-building-ios-cordova) - # if [[ "$run_ios" == "true" ]]; then - # cd ./platforms/ios/cordova/node_modules/ - # npm install ios-sim@latest - # cd ../../../../ - # fi - # plugin - # cordova plugin add ../ + cordova plugin add ../ # run if [[ "$run_ios" == "true" ]]; then