fis-command-release
Advanced tools
Comparing version 0.4.3 to 0.4.4
{ | ||
"name" : "fis-command-release", | ||
"description" : "fis release command.", | ||
"version" : "0.4.3", | ||
"version" : "0.4.4", | ||
"author" : "FIS Team <fis@baidu.com>", | ||
@@ -6,0 +6,0 @@ "homepage" : "http://fis.baidu.com/", |
@@ -88,3 +88,2 @@ /* | ||
.option('-w, --watch', 'monitor the changes of project') | ||
.option('-c, --clean', 'clean cache before releasing') | ||
.option('--md5 <level>', 'md5 release option', parseInt, 0) | ||
@@ -97,2 +96,9 @@ .option('--domains', 'add domain name', Boolean, false) | ||
.action(function(options){ | ||
//configure log | ||
if(options.debug){ | ||
fis.log.level = fis.log.L_ALL; | ||
fis.log.throw = true; | ||
} | ||
//try to find fis-conf.js | ||
@@ -113,2 +119,11 @@ var root = fis.util.realpath(process.cwd()), | ||
} while(pos > 0); | ||
//domain, fuck EventEmitter | ||
if(options.domains){ | ||
options.domain = true; | ||
delete options.domains; | ||
} | ||
//md5 > 0, force release hash file | ||
options.hash = options.md5 > 0; | ||
//init project | ||
@@ -120,3 +135,8 @@ fis.project.setProjectRoot(root); | ||
if(conf){ | ||
//init user conf | ||
var cache = new fis.cache.Cache(conf, 'conf'); | ||
if(!cache.revert()){ | ||
var tmp = fis.compile.setup(options); | ||
fis.cache.clean(tmp); | ||
cache.save(); | ||
} | ||
require(conf); | ||
@@ -127,22 +147,2 @@ } else { | ||
//configure log | ||
if(options.debug){ | ||
fis.log.level = fis.log.L_ALL; | ||
fis.log.throw = true; | ||
} | ||
if(options.domains){ | ||
options.domain = true; | ||
delete options.domains; | ||
} | ||
//md5 > 0, force release hash file | ||
options.hash = options.md5 > 0; | ||
if(options.clean){ | ||
//compile setup | ||
var tmp = fis.compile.setup(options); | ||
fis.cache.clean(tmp); | ||
} | ||
if(options.watch){ | ||
@@ -149,0 +149,0 @@ watch(options); |
11145
198