cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <...@git.apache.org>
Subject [GitHub] cordova-coho pull request: CB-7904 Built nightly releases using co...
Date Fri, 13 May 2016 07:39:51 GMT
Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/116#discussion_r63143586
  
    --- Diff: src/nightly.js ---
    @@ -66,38 +82,19 @@ module.exports = function*(argv) {
             yield gitutil.resetFromOrigin();
         })
     
    -    //get SHAS from platforms
    +    // Get SHAS from repos
         var SHAJSON = yield retrieveSha(repos);
     
    -    //save SHAJSON in cordova-cli repo
    -    yield repoutil.forEachRepo([cli], function*() {
    -        //need to get the path to cordova-cli using executil
    -        var cordovaclidir = process.cwd();
    -        fs.writeFileSync((path.join(cordovaclidir, 'shas.json')), JSON.stringify(SHAJSON,
null, 4), 'utf8', function(err) {
    -            if (err) return console.log (err);
    -        });
    -
    -    });
    -
    -    //Update platform references at cordova-lib/src/cordova/platformsConfig.json
    -    var cordovalibdir;
    -    yield repoutil.forEachRepo([cordovaLib], function*() {
    -        //need to get the path to cordova-lib using executil
    -        cordovalibdir = process.cwd();
    -    });
    -
    -    yield updatePlatformsFile(path.join(cordovalibdir, 'src/cordova/platformsConfig.json'),
SHAJSON);
    -
    -
         var currentDate = new Date();
         var nightlyVersion = '-nightly.' + currentDate.getFullYear() + '.' +
    -                        currentDate.getMonth() + '.' + currentDate.getDate();
    +                        pad(currentDate.getMonth() + 1) + '.' + pad(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;
    +        packageJSON.version = versionutil.removeDev(packageJSON.version) + nightlyVersion
+
    +            '+' + SHAJSON[repo.id];
    --- End diff --
    
    > Generally, eight to ten characters are more than enough to be unique within a project
    
    (from [Git book](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#Short-SHA-1))
so stripping to 8 characters should be enough for our purposes 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message