Commit 61c4e6f5 authored by Caleb Weeks's avatar Caleb Weeks
Browse files

wip

parent 519c952c
......@@ -369,6 +369,31 @@ module.exports=function(options){
var done=_.after(ids.length, function(){
if(ids.length){
results.sort(function(a, b){
if(a.id == 'base'){
return -1;
}else if(b.id == 'base'){
return 1;
}else{
var aSite = a.id.split('.').shift();
var bSite = b.id.split('.').shift();
if(aSite === bSite){
if(a.id.indexOf('site') > -1){
return -1;
}else if(b.id.indexOf('site') > -1){
return 1;
}else{
return a.id.localeCompare(b.id);
}
}else{
return a.id.localeCompare(b.id);
}
}
});
cb(errors.length?errors:null, results);
}else{
cb(errors[0], results[0]);
......@@ -392,6 +417,7 @@ module.exports=function(options){
(function(git){
if(!options.verbose){git.silent(true);}
git.status(function(err, status){
//console.log('status', status);
var branchInfo={}, exists, curResult;
if(err){errors.push({id:id, err:err});done();}
else{
......
......@@ -10,7 +10,8 @@ var commands=["status","share-state"];
var usage=`usage:
bl git (-h | --help)
bl git status [<module-id>...] [--json] [--clean]
bl git status [<module-id>...] [--json] [--clean] [--verbose]
bl git share-state
options:
-b BRANCH, --branch=BRANCH Branch name [default: master]
......@@ -18,6 +19,7 @@ options:
-m MODULE-ID, --module=MODULE-ID Module id, of form 'my-site.my-module'
-j, --json Output in JSON format
-c, --clean Do not hide status of "clean" modules
-v, --verbose Show verbose output.
examples:
bl git status
......
......@@ -9,6 +9,7 @@ module.exports=function(args){
var showClean=args["--clean"];
var modules=args["<module-id>"];
var printedSomething=false;
var verbose = args["--verbose"];
var table = new Table({});
......@@ -17,7 +18,7 @@ module.exports=function(args){
}
builder.gitStatus(modules, {}, function(err, states){
builder.gitStatus(modules, {verbose}, function(err, states){
if(err){console.error(c.red("ERROR: "), c.white(JSON.stringify(err,null," ")));}
else{
_.each(states,function(state){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment