You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/08/30 15:25:52 UTC
[1/2] git commit: CB-4709 : add a foreach command to coho
Updated Branches:
refs/heads/master d8070b69e -> 0033b1e82
CB-4709 : add a foreach command to coho
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/db019fd2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/db019fd2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/db019fd2
Branch: refs/heads/master
Commit: db019fd2c1093126c1b59b4eed5a91855227de2b
Parents: d8070b6
Author: David Kemp <dr...@chromium.org>
Authored: Fri Aug 30 08:14:45 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Aug 30 09:23:49 2013 -0400
----------------------------------------------------------------------
coho | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/db019fd2/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index 9938286..a437fb8 100755
--- a/coho
+++ b/coho
@@ -882,6 +882,27 @@ function repoPushCommand(argv) {
});
}
+function repoPerformShellCommand(argv) {
+ var opt = registerRepoFlag(optimist)
+ opt = registerHelpFlag(opt);
+ var argv = opt
+ .usage('Performs the supplied shell command in each repo directory.\n' +
+ '\n' +
+ 'Usage: $0 foreach "shell command"')
+ .argv;
+
+ if (argv.h) {
+ optimist.showHelp();
+ process.exit(1);
+ }
+ var repos = computeReposFromFlag(argv.r);
+ var cmd = argv._[1];
+ forEachRepo(repos, function(repo) {
+ execHelper(cmd);
+ });
+ process.exit(0);
+}
+
function repoUpdateCommand(argv) {
var opt = registerRepoFlag(optimist)
var opt = opt
@@ -1486,6 +1507,10 @@ function main() {
name: 'upload-release',
desc: 'Uploads a signed .zip to Cordova\'s webserver.',
entryPoint: apacheUpload
+ }, {
+ name: 'foreach',
+ desc: 'Runs a shell command in each repo.',
+ entryPoint: repoPerformShellCommand
}
];
var commandMap = {};
[2/2] git commit: Change default of --repo to "auto" from "active"
Posted by ag...@apache.org.
Change default of --repo to "auto" from "active"
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/0033b1e8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/0033b1e8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/0033b1e8
Branch: refs/heads/master
Commit: 0033b1e8270031f4f026bd30f53aad54c3cfae02
Parents: db019fd
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Aug 30 09:22:12 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Aug 30 09:24:11 2013 -0400
----------------------------------------------------------------------
coho | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/0033b1e8/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index a437fb8..6895d5f 100755
--- a/coho
+++ b/coho
@@ -363,7 +363,7 @@ function registerRepoFlag(opt) {
return opt.options('r', {
alias: 'repo',
desc: 'Which repos to operate on. Multiple flags allowed. This can be repo IDs or repo groups. Use the list-repos command see valid values.',
- default: 'active'
+ default: 'auto'
});
}