Skip to content

Commit

Permalink
cimpler status -v: make into array
Browse files Browse the repository at this point in the history
So that it's machine parseable.
  • Loading branch information
danielbeardsley committed Aug 8, 2014
1 parent 82f3e6b commit d0d48c9
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions bin/cimpler
Expand Up @@ -73,20 +73,15 @@ switch (command) {

case 'status':
httpTrigger.getStatus(args.port, function(err, builds) {
if (args.verbose) {
console.dir([].concat(builds.building, builds.queued));
return;
}
builds.building.forEach(function(build) {
if (args.verbose) {
build.building = true;
console.dir(build);
} else {
console.log("* " + build.branch);
}
console.log("* " + build.branch);
});
builds.queued.forEach(function(build) {
if (args.verbose) {
console.dir(build);
} else {
console.log(" " + build.branch);
}
console.log(" " + build.branch);
});
if (builds.building.length == 0 && builds.queued.length == 0) {
console.log("(no builds in queue)");
Expand Down

0 comments on commit d0d48c9

Please sign in to comment.