cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Brooks <mich...@michaelbrooks.ca>
Subject Re: Cordova Upgrades
Date Tue, 10 Sep 2013 17:48:36 GMT
Effectively, this could also be used to downgrade a project because it's
updating the project to match the globally installed Cordova version.

Looks good though! It's important to keep the upgrade responsibility within
the platform scripts.

Michael


On Tue, Sep 10, 2013 at 8:30 AM, Andrew Grieve <agrieve@chromium.org> wrote:

> Our upgrade process from 2.9 -> 3.0 was to recreate a project and copy your
> files over. It would be sad if these were our instructions for 3.0 -> 3.1.
>
> What I'd like to see:
>
> $ cd MyProject
> $ cordova --version
> 3.0.9
> $ npm update -g cordova
> $ cordova --version
> 3.1.0-1.0.0
> $ cordova platform ls
> Installed platforms:
>  android 3.0.0
>  ios 3.0.0
> Available platforms:
>  android 3.1.0
>  ios 3.1.0
>  blackberry10 3.1.0
> $ cordova platform add android
> Platform android already exists. Use `update` to update it.
> $ cordova platform update android
> Updated android from 3.0.0 to 3.1.0
> $ cordova platform ls
> Installed platforms:
>  android 3.1.0
>  ios 3.0.0
> Available platforms:
>  ios 3.1.0
>  blackberry10 3.1.0
>
>
> How does `cordova update` work?
> - It uses platforms/*/cordova/version script to discover current version
> - It fetches the new version into $HOME/.cordova/libs
> - It runs new_version/bin/update path/to/platforms/$PLATFORM for the
> specified platform
>
> The platform script is responsible for:
> #1 - doing all easily automated steps (update Cordova.jar, update scripts
> within cordova/)
> #2 - Printing out a message saying what manual steps should be taken to
> complete the upgrade (e.g. Please add this snippet to your
> ApplicationDelegate)
>
>
> Sound good? Any other ideas?
>

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