You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Lorin Beer (JIRA)" <ji...@apache.org> on 2013/10/23 20:45:48 UTC

[jira] [Resolved] (CB-4776) Add `cordova platform update` command

     [ https://issues.apache.org/jira/browse/CB-4776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lorin Beer resolved CB-4776.
----------------------------

    Resolution: Fixed

last subissue has been resolved, closing

> Add `cordova platform update` command
> -------------------------------------
>
>                 Key: CB-4776
>                 URL: https://issues.apache.org/jira/browse/CB-4776
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>            Reporter: Andrew Grieve
>            Assignee: Lorin Beer
>
> Example workflow:
> {code}
> $ 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 upgrade 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
> {code}
> How does `cordova platform 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/upgrade path/to/platforms/$PLATFORM for the specified platform
> The platform script is responsible for:
> #1 - doing all easily automated steps (e.g. 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)



--
This message was sent by Atlassian JIRA
(v6.1#6144)