[ 
https://issues.apache.org/jira/browse/CB-9108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14569782#comment-14569782
 ] 

ASF GitHub Bot commented on CB-9108:
------------------------------------

GitHub user TimBarham opened a pull request:

    https://github.com/apache/cordova-lib/pull/232

    CB-9108 Handle version ranges when add platform with --usegit.

    Adding a platform using a version range didn't work with `--usegit`, since 
it would try to use that version range as a git tag. This was a problem if you 
added the platform using `platform add <platform>@<range>`, and also because 
our pinned platforms now use tilde versions (which are shorthand for a version 
range).
    
    Fix is to use `npm view` to find the most recent version that matches the 
range, and use that.
    
    We need to do the same when installing from npm, when we do our check to 
see if the requested version has previously been downloaded using git.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-lib CB-9108

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-lib/pull/232.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #232
    
----
commit 884340739b9c289f1acf12bfd63696d45e03482e
Author: Tim Barham <[email protected]>
Date:   2015-06-02T21:14:57Z

    CB-9108 Handle version ranges when add platform with --usegit.
    
    Adding a platform using a version range didn't work with --usegit, since it 
would try to use that version range as a git tag. This was a problem if you 
added the platform using 'platform add <platform>@<range>', and also because 
our pinned platforms now use tilde versions (which are shorthand for a version 
range).
    
    Fix is to use npm to find the most recent version that matches the range, 
and use that.
    
    We need to do the same when installing from npm, when we do our check to 
see if the requested version has previously been downloaded using git.

----


> Adding a platform fails with --usegit flag
> ------------------------------------------
>
>                 Key: CB-9108
>                 URL: https://issues.apache.org/jira/browse/CB-9108
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: Master
>            Reporter: Tim Barham
>            Assignee: Tim Barham
>
> Since updating pinned platforms to use tilde ranges, adding a platform using 
> the {{--usegit}} flag fails, since we try to use the version string with the 
> tilde as a git tag.
> Note that adding the platform using {{<platform>@<range>}} also fails if 
> {{--usegit}} is specified.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to