Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6E71178B3 for ; Wed, 27 May 2015 17:35:33 +0000 (UTC) Received: (qmail 29558 invoked by uid 500); 27 May 2015 17:35:17 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 29532 invoked by uid 500); 27 May 2015 17:35:17 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 29521 invoked by uid 99); 27 May 2015 17:35:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2015 17:35:17 +0000 Date: Wed, 27 May 2015 17:35:17 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-8900) Document Platform and Plugin Version Management MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-8900?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1456134= 0#comment-14561340 ]=20 ASF GitHub Bot commented on CB-8900: ------------------------------------ Github user TimBarham commented on a diff in the pull request: https://github.com/apache/cordova-docs/pull/292#discussion_r31159121 =20 --- Diff: docs/en/edge/platform_plugin_versioning_ref/index.md --- @@ -0,0 +1,82 @@ +--- +license: Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--- + +# Platforms and Plugins Version Management +From version 4.3.0 onwards, Cordova provides the ability to save and r= estore platforms and plugins.=20 + +This feature allows developers to save and restore their app to a know= n state without having to check in all of the platform and plugin source co= de. + +The 'save' command stores details about the app's platform and plugin = versions in config.xml. +The 'restore' step happens automatically when a **'cordova prepare'** = is issued, making use of information previously saved in the config.xml fil= e. + +One scenario where save/restore capabilities come in handy is in large= teams that work on an app, with each team member focusing on a platform or= plugin. This feature makes it easier to share the project and reduce the a= mount of redundant code that is checked in the repository. + + +## Platform Versioning + +### Saving platforms +To save a platform, you issue the following command : + + $ cordova platform add ] | directory | git_url= > --save + +After running the above command, the resulting config.xml looks like : + + + ... + + ... + + + +Some examples : + * **'cordova platform add android --save'** =3D> retrieves the pinne= d version of the android platform, adds it to the project and then updates = config.xml. + * **'cordova platform add android@3.7.0 --save'** =3D> retrieves the= android platform, version 3.7.0 from npm, adds it to the project and then = updates config.xml. + * **'cordova platform add https://github.com/apache/cordova-android.= git=E2=80=8B --save'** =3D> clones the specified cordova-android git reposi= tory, adds the android platform to the project, then updates config.xml and= point its version to the specified git-url. + * **'cordova platform add C:/path/to/android/platform --save'** =3D>= retrieves the android platform from the specified directory, adds it to th= e project, then updates config.xml and point to the directory. + +### Mass saving platforms on an existing project +The '--save' flag describe above is only useful when you remember to u= se it during the platform addition. +If you have a pre-existing project and you want to mass-save all exist= ing platforms in it, you can use : + + $ cordova platform save + + +### Updating / Removing platforms +It is also possible to update/delete from config.xml during the comman= ds 'cordova platform update' and 'cordova platform remove' : + + $ cordova platform update ] | directory | git_= url> --save + $ cordova platform remove --save +Some examples : + * **'cordova platform update android --save'** =3D> In addition to u= pdating the android platform to the pinned version, update config.xml entry + * **'cordova platform update android@3.8.0 --save'** =3D> In additio= n to updating the android platform to version 3.8.0, update config.xml entr= y + * **'cordova platform update /path/to/android/platform --save'** =3D= > In addition to updating the android platform to version in the folder, up= date config.xml entry + * **'cordova platform remove android --save'** =3D> Removes the andr= oid platform from the project and deletes its entry from config.xml. + + +### Restoring platforms + * Platforms are automatically restored from config.xml when the **'c= ordova prepare'** command is run. + * If you add a platform without specifying a version/folder/git_url,= the version of the platform that would get added would be one compatible t= o the one in config.xml **if found**. --- End diff -- =20 How about something like: =20 If you add a platform without specifying a version/folder/git_url, the = version to install is taken from config.xml, if found. > Document Platform and Plugin Version Management > ----------------------------------------------- > > Key: CB-8900 > URL: https://issues.apache.org/jira/browse/CB-8900 > Project: Apache Cordova > Issue Type: Task > Components: Docs > Reporter: Omar Mefire > Assignee: Omar Mefire > > This issue is to track work done on documenting the new feature 'platform= and plugin version management'. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org