Skip to content

Commit

Permalink
fix: corrected testbed init with latest cordova
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Aug 17, 2017
1 parent 2c2b586 commit 146974f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
4 changes: 2 additions & 2 deletions testbed/config.template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<widget id="com.eneff.branch.cordovatestbed" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- Branch -->

<!-- remove spec to switch from local to npm -->
<plugin name="branch-cordova-sdk" spec="../" />
<!-- uncomment line below to switch from local to npm -->
<!-- <plugin name="branch-cordova-sdk" spec="^2.6.0" /> -->
<branch-config>
<branch-key value="key_live_ndqptlgXNE4LHqIahH1WIpbiyFlb62J3" />
<uri-scheme value="branchcordova" />
Expand Down
24 changes: 8 additions & 16 deletions testbed/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 146974f

Please sign in to comment.