fis-command-release
Advanced tools
Comparing version 0.6.6 to 0.6.7
{ | ||
"name" : "fis-command-release", | ||
"description" : "fis release command.", | ||
"version" : "0.6.6", | ||
"version" : "0.6.7", | ||
"author" : "FIS Team <fis@baidu.com>", | ||
@@ -6,0 +6,0 @@ "homepage" : "http://fis.baidu.com/", |
@@ -78,26 +78,34 @@ /* | ||
opt.beforeCompile = function(file){ | ||
if(!collection[file.subpath]){ | ||
collection[file.subpath] = file; | ||
process.stdout.write(flag); | ||
} | ||
collection[file.subpath] = file; | ||
process.stdout.write(flag); | ||
}; | ||
//release | ||
fis.release(opt, function(ret){ | ||
for(var item in collection){ | ||
process.stdout.write( | ||
(opt.debug ? '' : ' ') + | ||
(Date.now() - start + 'ms').bold.green + '\n' | ||
); | ||
if(opt.unique){ | ||
time(fis.compile.clean); | ||
try { | ||
//release | ||
fis.release(opt, function(ret){ | ||
for(var item in collection){ | ||
process.stdout.write( | ||
(opt.debug ? '' : ' ') + | ||
(Date.now() - start + 'ms').bold.green + '\n' | ||
); | ||
if(opt.unique){ | ||
time(fis.compile.clean); | ||
} | ||
if(collection.hasOwnProperty(item)){ | ||
deploy(opt.dest, opt.md5, collection); | ||
deploy(opt.dest, opt.md5, ret.pkg); | ||
collection = {}; | ||
return; | ||
} | ||
} | ||
if(collection.hasOwnProperty(item)){ | ||
deploy(opt.dest, opt.md5, collection); | ||
deploy(opt.dest, opt.md5, ret.pkg); | ||
collection = {}; | ||
return; | ||
}); | ||
} catch(e) { | ||
process.stdout.write('\n [ERROR] ' + (e.message || e) + '\u0007\n'); | ||
if(!opt.watch){ | ||
if(opt.debug){ | ||
throw e; | ||
} | ||
process.exit(1); | ||
} | ||
}); | ||
} | ||
} | ||
@@ -119,6 +127,7 @@ | ||
fis.log.throw = true; | ||
//configure log | ||
if(options.debug){ | ||
fis.log.level = fis.log.L_ALL; | ||
fis.log.throw = true; | ||
} | ||
@@ -125,0 +134,0 @@ var root, conf, filename = fis.project.conf; |
13412
275