Update data files only if the contents have actually changed

This commit is contained in:
Reinhard Pointner 2019-05-22 19:08:13 +07:00
parent a427d913e9
commit 0b852bc75a
1 changed files with 6 additions and 6 deletions

View File

@ -58,13 +58,13 @@ def pack(file, lines) {
lines.each{ writer.append(it).append('\n') }
}
}
} else {
log.warning "[NOT MODIFIED] $file [$previousHash]"
}
def rows = lines.size()
def columns = lines.collect{ it.split(/\t/).length }.max()
log.info "${file.canonicalFile} ($rows rows, $columns columns)"
def rows = lines.size()
def columns = lines.collect{ it.split(/\t/).length }.max()
log.info "${file.canonicalFile} ($rows rows, $columns columns)"
} else {
log.finest "[NOT MODIFIED] $file [$previousHash]"
}
}
def hash(file) {