cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11262) Add a warning about prerelease lib/cli usage
Date Tue, 17 May 2016 09:39:12 GMT

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

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

Github user daserge commented on a diff in the pull request:

    https://github.com/apache/cordova-cli/pull/251#discussion_r63492190
  
    --- Diff: src/cli.js ---
    @@ -234,17 +234,24 @@ function cli(inputArgs) {
     
         var args = nopt(knownOpts, shortHands, inputArgs);
     
    -    if (args.version) {
    -        var cliVersion = require('../package').version;
    +    var cliVersion = require('../package').version;
    +    // TODO: Use semver.prerelease when it gets released
    +    var usingPrerelease = /-nightly|-dev$/.exec(cliVersion);
    +    if (args.version || usingPrerelease) {
             var libVersion = require('cordova-lib/package').version;
             var toPrint = cliVersion;
             if (cliVersion != libVersion || /-dev$/.exec(libVersion)) {
    --- End diff --
    
    `nightly` versions include SHA so they should be different. 
    Although it might make sense just to use `usingPrerelease` flag in this check (there is
a little probability of SHAs match).


> Add a warning about prerelease lib/cli usage
> --------------------------------------------
>
>                 Key: CB-11262
>                 URL: https://issues.apache.org/jira/browse/CB-11262
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: CLI
>            Reporter: Sergey Shakhnazarov
>            Assignee: Sergey Shakhnazarov
>




--
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


Mime
View raw message