fis-command-release
Advanced tools
Comparing version 0.3.9 to 0.4.0
@@ -24,11 +24,15 @@ /* | ||
function deploy(dest, file){ | ||
if(dest.receiver){ | ||
if(!file.useHash || dest.md5 != 1){ | ||
upload(dest.receiver, dest.to, file.release, file); | ||
if(file.release){ | ||
if(dest.receiver){ | ||
if(!file.useHash || dest.md5 != 1){ | ||
upload(dest.receiver, dest.to, file.release, file); | ||
} | ||
if(file.useHash && dest.md5 > 0){ | ||
upload(dest.receiver, dest.to, file.getHashRelease(), file); | ||
} | ||
} else { | ||
file.deliver(dest.to, dest.md5); | ||
} | ||
if(file.useHash && dest.md5 > 0){ | ||
upload(dest.receiver, dest.to, file.getHashRelease(), file); | ||
} | ||
} else { | ||
file.deliver(dest.to, dest.md5); | ||
fis.log.error('unreleasable file [' + file.realpath + ']'); | ||
} | ||
@@ -63,3 +67,3 @@ } | ||
dests.forEach(function(d){ | ||
if(file.release.indexOf(d.from) === 0 && fis.util.filter(file.subpath, d.include, d.exclude)){ | ||
if(file.release && file.release.indexOf(d.from) === 0 && fis.util.filter(file.subpath, d.include, d.exclude)){ | ||
deploy(d, file); | ||
@@ -66,0 +70,0 @@ } |
{ | ||
"name" : "fis-command-release", | ||
"description" : "fis release command.", | ||
"version" : "0.3.9", | ||
"version" : "0.4.0", | ||
"author" : "FIS Team <fis@baidu.com>", | ||
@@ -6,0 +6,0 @@ "homepage" : "http://fis.baidu.com/", |
@@ -59,3 +59,3 @@ /* | ||
//collect file to deploy | ||
if((file.cache && file.cache.expired) || lastModified[file.subpath] !== mtime){ | ||
if(file.release && ((file.cache && file.cache.expired) || lastModified[file.subpath] !== mtime)){ | ||
lastModified[file.subpath] = mtime; | ||
@@ -62,0 +62,0 @@ collection[file.subpath] = file; |
11108
224