Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-4776

Add `cordova platform update` command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • cordova-cli
    • None

    Description

      Example workflow:

      $ 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
      

      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)

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              lorin.beer Lorin Beer
              agrieve Andrew Grieve
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: