cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Kim <>
Subject Standardising How to Get Cordova Version in a Project
Date Thu, 02 May 2013 21:18:27 GMT
Hey gang,

So I'm working on the engine tag for plugman and I've come across a bit of
a problem. For those who don't know, the engine tag is for checking whether
a plugin needs a certain version of Cordova to work. It's one of the last
outstanding features for the plugman spec that has yet to be implemented.

Anyhow, the problem is figuring out what version of Cordova a particular
project is using. Each platform is different in how they 'determine' which
current version is being used. eg, VERSION files, a jar file that has the
version string in it, cordova js file with version in the file name or
first line, etc.

Moving forward, I was hoping that we could include an additional config xml
element to specify which version of Cordova is being used. So something
like that could be added in during the create scripts. That way I can just
reference the config xml file and get all the info I need.

However, the problem with that approach is if a particular user decides to
just upgrade their project but copying and pasting new files or changed
version somehow, they will also have to remember to upgrade their version
string in config xml. It's not so bad, but kinda annoying.

If no change is made, I've done some work to solve this problem but it's
pretty brittle. You supply a possible path(s) of where you think the
version string might be and it'll try and figure it out for you. So it
should work with the recent change of moving the version number to the top
of the cordova.js file:

Timothy Kim

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message