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-11279) Add support for multiple repos ('--repo' option) to 'coho nightly' command
Date Wed, 18 May 2016 19:01:12 GMT

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

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

Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/122#discussion_r63761902
  
    --- Diff: src/nightly.js ---
    @@ -60,36 +62,26 @@ module.exports = function*(argv) {
         }
     
         // Clone and update Repos
    -    yield repoclone.cloneRepos(repos, /*silent=*/true);
    -    yield repoupdate.updateRepos(repos);
    -
    -    //remove local changes and sync up with remote master
    -    yield repoutil.forEachRepo(repos, function*() {
    -        yield gitutil.gitClean();
    -        yield gitutil.resetFromOrigin();
    -    });
    +    yield prepareRepos(argv.r);
     
    -    // Get SHAS from repos
    -    var SHAJSON = yield retrieveSha(repos);
    +    var reposToBuild = flagutil.computeReposFromFlag(argv.r, { includeModules: true });
    +    // Get updated nightly versions for all repos
    +    /** @type {Object} A map of repo.id and a short SHA for every repo to build */
    +    var VERSIONS = yield retrieveVersions(reposToBuild);
     
    -    var currentDate = new Date();
    -    var nightlyVersion = '-nightly.' + currentDate.getFullYear() + '.' +
    -        (currentDate.getMonth() + 1) + '.' + currentDate.getDate();
    -    var cordovaLibVersion;
         //update package.json version for cli + lib, update lib reference for cli
    -    yield repoutil.forEachRepo([cordovaLib, cli], function*(repo) {
    -        var dir = process.cwd();
    -        var packageJSON = require(dir+'/package.json');
    -        packageJSON.version = versionutil.removeDev(packageJSON.version) + nightlyVersion
+
    -            '+' + SHAJSON[repo.id];
    -
    -        if(repo.id === 'lib'){
    -            cordovaLibVersion = packageJSON.version;
    -        } else {
    -            packageJSON.dependencies['cordova-lib'] = cordovaLibVersion;
    -        }
    +    yield repoutil.forEachRepo(reposToBuild, function*(repo) {
    +        var packageJSONPath = path.join(process.cwd(), 'package.json');
    +        var packageJSON = require(packageJSONPath);
    --- End diff --
    
    They now get updated by `versionutil.updateRepoVersion` - it handles all possible places,
where version needs to be written to (see https://github.com/apache/cordova-coho/pull/122/files#diff-91127a766407aac9c0bc1bf9da171917R75)
This method was a part of 'platform-release' before but i decided to move it to `versionutil`
as it is IMO more appropriate place.


> Add support for multiple repos ('--repo' option) to 'coho nightly' command
> --------------------------------------------------------------------------
>
>                 Key: CB-11279
>                 URL: https://issues.apache.org/jira/browse/CB-11279
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: Coho
>            Reporter: Vladimir Kotikov
>            Assignee: Vladimir Kotikov
>




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