I have started to look into adding cordova.platformVersion to cordova.js.
Issue [1].
Trying to figure out the best way to implement this.
One potential method.
1) Pass in platformVersion to cordova.js during build step. Make coho
handle it during release process:
First off, cordovajs doesn't get branched and tagged on its own anymore
Non-Browserify use case
A) coho prepare-release-branch --version 3.5.0 -r android
- This step would build cordova-js, inject cordova.platformVersion based
on the --version being passed in.
- Updating version in package.json files
- Updating version numbers
- Creating release branches
B) coho tag-release --version 3.5.0 -r android
- Tag cordova-android "3.5.0"
- Tag cordova-js "android-3.5.0"
Browserify use case
Currently, cordova.version is set to 'N/A' in browserify builds of
cordova.js.
We would probably have to create a utility function that grabs the
cordova.platformVersion property from "platform_www/cordova.js" files.
These are the cordova.js files that get bundled at release with the
platforms from the non-browserify use case.
Use the version when building cordova.js in prepare-browserify.js.
Thoughts? Other suggestions?
[1] https://issues.apache.org/jira/browse/CB-7219