GitHub user filmaj opened a pull request:
https://github.com/apache/cordova-mobile-spec/pull/142
[CB-12186] [create script] Support passing in of `--variable` flags to
plugins
### Platforms affected
All.
### What does this PR do?
Using mobile-spec's `createmobilespec` helper script to create a mobile app
wrapping mobile-spec, you can now pass `--variable` flags down to the plugins
composing the app shell.
Singular use case this satisfies at the moment: [passing in a server
endpoint for pointing the file-transfer plugin's tests
to](https://github.com/apache/cordova-plugin-file-transfer/blob/master/tests/plugin.xml#L33).
### What testing has been done on this change?
After running:
```
â ./cordova-mobile-spec/createmobilespec/createmobilespec.js --debug
--android --variable
"FILETRANSFER_SERVER_ADDRESS=\"http://evening-reaches-13417.herokuapp.com:5000\""
mobspec-android
```
.. I was able to successfully create an Android app that pointed to the
specified server target URL:
```
~/src/mobspec-android via ⬢ v6.9.1
â ack heroku platforms/android
platforms/android/android.json
274: "FILETRANSFER_SERVER_ADDRESS":
"http://evening-reaches-13417.herokuapp.com:5000",
platforms/android/assets/www/fileTransferOpts.json
1:{"serverAddress":"http://evening-reaches-13417.herokuapp.com:5000"}
```
### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html)
in the JIRA database: [CB-12186](https://issues.apache.org/jira/browse/CB-12186)
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform
affected.
- [ ] Added automated test coverage as appropriate for this change. Womp
womp, no test coverage in place for this script anyways.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/filmaj/cordova-mobile-spec
create-plugin-var-support
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-mobile-spec/pull/142.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #142
----
commit 859f1ebabdba1e10c520bd1dcc9502c2b813b4a3
Author: filmaj <[email protected]>
Date: 2016-11-25T17:23:54Z
[CB-12186] [create script] Support passing in of `--variable` flags to
plugins. Need to be more defensive about empty searchpath use, otherwise it
fails.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]