Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5797F2009A8 for ; Tue, 17 May 2016 18:29:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 561061609F5; Tue, 17 May 2016 16:29:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A017B1607A8 for ; Tue, 17 May 2016 18:29:34 +0200 (CEST) Received: (qmail 75610 invoked by uid 500); 17 May 2016 16:29:33 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 75598 invoked by uid 99); 17 May 2016 16:29:33 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 May 2016 16:29:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 587A6DFB73; Tue, 17 May 2016 16:29:33 +0000 (UTC) From: nikhilkh To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-coho pull request: CB-11279 Support arbitrary repositories... Content-Type: text/plain Message-Id: <20160517162933.587A6DFB73@git1-us-west.apache.org> Date: Tue, 17 May 2016 16:29:33 +0000 (UTC) archived-at: Tue, 17 May 2016 16:29:35 -0000 Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-coho/pull/122#discussion_r63556380 --- 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 -- For platform repos we maintain other files that have the version as well - like for cordova-android there is the `VERSION` file --- 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