Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
9a73b7f248 | |||
ce821d8f53 | |||
de9ff2b54a | |||
bd41e2d2f5 |
63
src/main/nim/cliconstants.nim
Normal file
63
src/main/nim/cliconstants.nim
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
const VERSION* = "2.0.1"
|
||||||
|
|
||||||
|
const USAGE* = """
|
||||||
|
Usage:
|
||||||
|
treediff <left> [<right>] [options]
|
||||||
|
treediff (-h | --help)
|
||||||
|
treediff (-V | --version)
|
||||||
|
|
||||||
|
<left> and <right> represent paths to directory roots to be compared. If one
|
||||||
|
of these paths points to a file instead of a directory, treediff assumes that
|
||||||
|
the file represents a saved directory analysis to be loaded in place of a
|
||||||
|
directory to compare. For example:
|
||||||
|
|
||||||
|
treediff /path/to/dir /path/to/output.json
|
||||||
|
|
||||||
|
will analyze the directory tree at '/path/to/dir' to create the left-side
|
||||||
|
analysis and load a pre-existing analysis from '/path/to/output.json' as the
|
||||||
|
right-side analysis.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h --help Show this usage information.
|
||||||
|
-V --version Show the program version.
|
||||||
|
-v --verbose Enable verbose output.
|
||||||
|
-q --quiet Suppress all output and error messages except for the
|
||||||
|
progress indicator.
|
||||||
|
-Q --very-quiet Suppress all output and error messages includeing the
|
||||||
|
progress indicator.
|
||||||
|
|
||||||
|
-1 --save-left <left_out> Save the left analysis to <left_out> (will be
|
||||||
|
formatted as JSON)
|
||||||
|
-2 --save-right <right_out> Save the right analysis to <right_out> (will be
|
||||||
|
formatted as JSON)
|
||||||
|
|
||||||
|
-s --same
|
||||||
|
-S --exclude-same
|
||||||
|
|
||||||
|
Show or hide information about files which are the same in both trees.
|
||||||
|
|
||||||
|
-c --content-mismatch
|
||||||
|
-C --exclude-content-mismatch
|
||||||
|
|
||||||
|
Show or hide information about files whose relative paths are the same
|
||||||
|
in both trees but whose contents differ.
|
||||||
|
|
||||||
|
-p --path-mismatch
|
||||||
|
-P --exclude-path-mismatch
|
||||||
|
|
||||||
|
Show or hide information about files whose contents are the same in both
|
||||||
|
trees but whose relative paths differ.
|
||||||
|
|
||||||
|
-l --left-only
|
||||||
|
-L --exclude-left-only
|
||||||
|
|
||||||
|
Show or hide information about files which are found only in the left
|
||||||
|
tree.
|
||||||
|
|
||||||
|
-r --right-only
|
||||||
|
-R --exclude-right-only
|
||||||
|
|
||||||
|
Show or hide information about files which are found only in the right
|
||||||
|
tree.
|
||||||
|
|
||||||
|
"""
|
@ -1,37 +1,33 @@
|
|||||||
import md5
|
import std/streams
|
||||||
import os
|
import checksums/md5
|
||||||
|
|
||||||
proc fileToMD5*(filename: string) : string =
|
proc fileToMD5*(filename: string) : string =
|
||||||
|
|
||||||
const blockSize: int = 8192
|
const blockSize: int = 8192 # read files in 8KB chunnks
|
||||||
var
|
var
|
||||||
c: MD5Context
|
c: MD5Context
|
||||||
d: MD5Digest
|
d: MD5Digest
|
||||||
f: File
|
fs: FileStream
|
||||||
bytesRead: int = 0
|
buffer: string
|
||||||
buffer: array[blockSize, char]
|
|
||||||
byteTotal: int = 0
|
|
||||||
|
|
||||||
#read chunk of file, calling update until all bytes have been read
|
#read chunk of file, calling update until all bytes have been read
|
||||||
try:
|
try:
|
||||||
f = open(filename)
|
fs = filename.open.newFileStream
|
||||||
|
|
||||||
md5Init(c)
|
md5Init(c)
|
||||||
bytesRead = f.readBuffer(buffer.addr, blockSize)
|
buffer = fs.readStr(blockSize)
|
||||||
|
|
||||||
while bytesRead > 0:
|
while buffer.len > 0:
|
||||||
byteTotal += bytesRead
|
md5Update(c, buffer.cstring, buffer.len)
|
||||||
md5Update(c, buffer, bytesRead)
|
buffer = fs.readStr(blockSize)
|
||||||
bytesRead = f.readBuffer(buffer.addr, blockSize)
|
|
||||||
|
|
||||||
md5Final(c, d)
|
md5Final(c, d)
|
||||||
|
|
||||||
except IOError:
|
except IOError: echo("File not found.")
|
||||||
echo("File not found.")
|
|
||||||
finally:
|
finally:
|
||||||
if f != nil:
|
if fs != nil:
|
||||||
close(f)
|
close(fs)
|
||||||
|
|
||||||
result = $d
|
result = $d
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
##
|
##
|
||||||
## Utility to compare the file contents of two directory trees.
|
## Utility to compare the file contents of two directory trees.
|
||||||
|
|
||||||
import os, tables, streams, sequtils, strutils, docopt, marshal
|
import std/[json, jsonutils, os, tables, sequtils, strutils]
|
||||||
|
import docopt
|
||||||
import incremental_md5, console_progress
|
import incremental_md5, console_progress
|
||||||
|
|
||||||
|
import ./cliconstants
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -20,7 +22,7 @@ type
|
|||||||
proc newProgressWrapper*(outFile = stdout, verbosity = normal): ProgressWrapper =
|
proc newProgressWrapper*(outFile = stdout, verbosity = normal): ProgressWrapper =
|
||||||
## Create a new ProgressWrapper for the given verbosity.
|
## Create a new ProgressWrapper for the given verbosity.
|
||||||
if verbosity > very_quiet:
|
if verbosity > very_quiet:
|
||||||
result = (impl: newProgress(outFile, 0), verbosity: verbosity)
|
result = (impl: newProgress(0, outFile), verbosity: verbosity)
|
||||||
else: result = (impl: nil, verbosity: verbosity)
|
else: result = (impl: nil, verbosity: verbosity)
|
||||||
|
|
||||||
proc init(p: ProgressWrapper, root: string, fileCount: int): void =
|
proc init(p: ProgressWrapper, root: string, fileCount: int): void =
|
||||||
@ -30,7 +32,7 @@ proc init(p: ProgressWrapper, root: string, fileCount: int): void =
|
|||||||
|
|
||||||
proc update(p: ProgressWrapper, count: int, file: string): void =
|
proc update(p: ProgressWrapper, count: int, file: string): void =
|
||||||
if p.verbosity > very_quiet:
|
if p.verbosity > very_quiet:
|
||||||
p.impl.updateProgress(count, file[(file.high - 15)..file.high])
|
p.impl.updateProgress(count, file[max(file.high - 15, 0)..file.high])
|
||||||
|
|
||||||
proc finish(p: ProgressWrapper): void =
|
proc finish(p: ProgressWrapper): void =
|
||||||
if p.verbosity > very_quiet:
|
if p.verbosity > very_quiet:
|
||||||
@ -63,99 +65,121 @@ proc getRelPath(ancestor, child: string): string =
|
|||||||
# build a relative path without backtracking.
|
# build a relative path without backtracking.
|
||||||
if idx != ancestorPath.len: return ""
|
if idx != ancestorPath.len: return ""
|
||||||
return foldl(@["."] & childPath[idx..childPath.high], joinPath(a, b))
|
return foldl(@["."] & childPath[idx..childPath.high], joinPath(a, b))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
FileEntry* = tuple[relPath: string, checksum: string]
|
FileEntry* = ref tuple[relPath: string, checksum: string]
|
||||||
## Data about one file that has been analyzed
|
## Data about one file that has been analyzed
|
||||||
|
|
||||||
DirAnalysis* = ## Analysis data about one directory tree.
|
DirAnalysis* = ## Analysis data about one directory tree.
|
||||||
tuple[allEntries: seq[ref FileEntry],
|
tuple[allEntries: seq[FileEntry],
|
||||||
byRelPath: ref Table[string, ref FileEntry],
|
byRelPath: TableRef[string, FileEntry],
|
||||||
byChecksum: ref Table[string, seq[ref FileEntry]]]
|
byChecksum: TableRef[string, seq[FileEntry]]]
|
||||||
|
|
||||||
|
|
||||||
DisplayOptions = tuple[left, right, same, content, path: bool]
|
DisplayOptions = tuple[left, right, same, content, path: bool]
|
||||||
## Consolidated description of which types of results to display.
|
## Consolidated description of which types of results to display.
|
||||||
|
|
||||||
|
func `$`(f: FileEntry): string = f.checksum & ": " & f.relPath
|
||||||
|
|
||||||
|
proc getOrFail(n: JsonNode, key: string, objName: string = ""): JsonNode =
|
||||||
|
## convenience method to get a key from a JObject or raise an exception
|
||||||
|
if not n.hasKey(key): raise newException(Exception, objName & " missing key '" & key & "'")
|
||||||
|
return n[key]
|
||||||
|
|
||||||
|
proc getIfExists(n: JsonNode, key: string): JsonNode =
|
||||||
|
## convenience method to get a key from a JObject or return null
|
||||||
|
result = if n.hasKey(key): n[key]
|
||||||
|
else: newJNull()
|
||||||
|
|
||||||
|
func parseFileEntry(n: JsonNode): FileEntry =
|
||||||
|
result = new(FileEntry)
|
||||||
|
result.relPath = n.getOrFail("relPath").getStr
|
||||||
|
result.checksum = n.getOrFail("checksum").getStr
|
||||||
|
|
||||||
|
func initDirAnalysis(): DirAnalysis =
|
||||||
|
(allEntries: @[],
|
||||||
|
byRelPath: newTable[string, FileEntry](),
|
||||||
|
byChecksum: newTable[string, seq[FileEntry]]())
|
||||||
|
|
||||||
|
func indexEntries(da: var DirAnalysis) =
|
||||||
|
for e in da.allEntries:
|
||||||
|
da.byRelPath[e.relPath] = e
|
||||||
|
if not da.byChecksum.hasKey(e.checksum):
|
||||||
|
da.byChecksum[e.checksum] = newSeq[FileEntry]()
|
||||||
|
da.byChecksum[e.checksum].add(e)
|
||||||
|
|
||||||
proc analyzeDir*(root: string, progress: ProgressWrapper): DirAnalysis =
|
proc analyzeDir*(root: string, progress: ProgressWrapper): DirAnalysis =
|
||||||
## Inspect a directory and analyze all files, noting their relative paths and
|
## Inspect a directory and analyze all files, noting their relative paths and
|
||||||
## checksum of their contents.
|
## checksum of their contents.
|
||||||
let fileCount = countFiles(root)
|
let fileCount = countFiles(root)
|
||||||
|
|
||||||
progress.init(root, fileCount)
|
progress.init(root, fileCount + 10)
|
||||||
|
|
||||||
result = (allEntries: @[],
|
result = initDirAnalysis()
|
||||||
byRelPath: newTable[string, ref FileEntry](),
|
|
||||||
byChecksum: newTable[string, seq[ref FileEntry]]())
|
|
||||||
|
|
||||||
var count = 0
|
var count = 0
|
||||||
for file in walkDirRec(root):
|
for file in walkDirRec(root):
|
||||||
|
|
||||||
# Compute checksum
|
|
||||||
let md5sum = fileToMd5(file)
|
let md5sum = fileToMd5(file)
|
||||||
var fileEntry: ref FileEntry = new(ref FileEntry)
|
|
||||||
fileEntry[] = (relPath: getRelPath(root, file), checksum: md5sum )
|
|
||||||
|
|
||||||
# Add to allEntries list, byRelPath table, and byChecksum table
|
var fileEntry: FileEntry = new(FileEntry)
|
||||||
|
fileEntry[] = (relPath: getRelPath(root, file), checksum: md5sum)
|
||||||
result.allEntries.add(fileEntry)
|
result.allEntries.add(fileEntry)
|
||||||
result.byRelPath[fileEntry.relPath] = fileEntry
|
|
||||||
|
|
||||||
if not result.byChecksum.hasKey(fileEntry.relPath):
|
|
||||||
result.byChecksum[fileEntry.checksum] = newSeq[ref FileEntry]()
|
|
||||||
|
|
||||||
result.byChecksum[fileEntry.checksum].add(fileEntry)
|
|
||||||
|
|
||||||
progress.update(count, file)
|
progress.update(count, file)
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
|
result.indexEntries
|
||||||
|
count += 10
|
||||||
progress.finish()
|
progress.finish()
|
||||||
|
|
||||||
proc loadAnalysis*(path: string, analysis: var DirAnalysis) =
|
proc loadAnalysis*(path: string): DirAnalysis =
|
||||||
## Load a previously performed directory analysis.
|
## Load a previously performed directory analysis.
|
||||||
let inStream: Stream = newFileStream(path, fmRead)
|
let allEntriesJson = parseJson(readFile(path))
|
||||||
load(inStream, analysis)
|
result = initDirAnalysis()
|
||||||
|
result.allEntries = toSeq(items(allEntriesJson)).map(parseFileEntry)
|
||||||
|
result.indexEntries
|
||||||
|
|
||||||
proc saveAnalysis*(path: string, analysis: DirAnalysis): void =
|
proc saveAnalysis*(path: string, analysis: DirAnalysis): void =
|
||||||
## Save a completed analysis.
|
## Save a completed analysis.
|
||||||
let outStream = newFileStream(path, fmWrite)
|
writeFile(path, $(analysis.allEntries.toJson))
|
||||||
store(outStream, analysis)
|
|
||||||
|
|
||||||
proc intersection*(left, right: DirAnalysis): seq[ref FileEntry] =
|
proc intersection*(left, right: DirAnalysis): seq[FileEntry] =
|
||||||
## Find all ``FileEntry`` that are the same on both sides: matching contents
|
## Find all ``FileEntry`` that are the same on both sides: matching contents
|
||||||
## and paths.
|
## and paths.
|
||||||
return left.allEntries.filter do (item: ref FileEntry) -> bool:
|
return left.allEntries.filter do (item: FileEntry) -> bool:
|
||||||
if not right.byRelPath.hasKey(item.relPath): return false
|
if not right.byRelPath.hasKey(item.relPath): return false
|
||||||
let match = right.byRelPath[item.relPath]
|
let match = right.byRelPath[item.relPath]
|
||||||
|
if match == nil: return false
|
||||||
return item.checksum == match.checksum
|
return item.checksum == match.checksum
|
||||||
|
|
||||||
proc difference*(left, right: DirAnalysis): seq[ref FileEntry] =
|
proc difference*(left, right: DirAnalysis): seq[FileEntry] =
|
||||||
## Find all ``FileEntry`` that are present in the left but not present in
|
## Find all ``FileEntry`` that are present in the left but not present in
|
||||||
## the right.
|
## the right.
|
||||||
return left.allEntries.filter do (item: ref FileEntry) -> bool:
|
return left.allEntries.filter do (item: FileEntry) -> bool:
|
||||||
return not right.byRelPath.hasKey(item.relPath) and
|
return not right.byRelPath.hasKey(item.relPath) and
|
||||||
not right.byChecksum.hasKey(item.checksum)
|
not right.byChecksum.hasKey(item.checksum)
|
||||||
|
|
||||||
proc `*`*(left, right: DirAnalysis): seq[ref FileEntry] {.inline.} =
|
proc `*`*(left, right: DirAnalysis): seq[FileEntry] {.inline.} =
|
||||||
## Alias for `intersection(left, right) <#intersection>`_
|
## Alias for `intersection(left, right) <#intersection>`_
|
||||||
return intersection(left, right)
|
return intersection(left, right)
|
||||||
|
|
||||||
proc `-`*(left, right: DirAnalysis): seq[ref FileEntry] {.inline.} =
|
proc `-`*(left, right: DirAnalysis): seq[FileEntry] {.inline.} =
|
||||||
## Alias for `difference(left, right) <#difference>`_
|
## Alias for `difference(left, right) <#difference>`_
|
||||||
return difference(left, right)
|
return difference(left, right)
|
||||||
|
|
||||||
proc samePathDifferentContents*(left, right: DirAnalysis): seq[string] =
|
proc samePathDifferentContents*(left, right: DirAnalysis): seq[string] =
|
||||||
## Find all ``FileEntry`` that have the same paths in both trees but whose
|
## Find all ``FileEntry`` that have the same paths in both trees but whose
|
||||||
## contents differ.
|
## contents differ.
|
||||||
let matchingEntries = left.allEntries.filter do (item: ref FileEntry) -> bool:
|
let matchingEntries = left.allEntries.filter do (item: FileEntry) -> bool:
|
||||||
if not right.byRelPath.hasKey(item.relPath): return false
|
if not right.byRelPath.hasKey(item.relPath): return false
|
||||||
let match = right.byRelPath[item.relPath]
|
let match = right.byRelPath[item.relPath]
|
||||||
return item.checksum != match.checksum
|
return item.checksum != match.checksum
|
||||||
return matchingEntries.map(proc(item: ref FileEntry): string = return item.relPath)
|
return matchingEntries.map(proc(item: FileEntry): string = return item.relPath)
|
||||||
|
|
||||||
proc sameContentsDifferentPaths*(left, right: DirAnalysis): seq[tuple[left, right: ref FileEntry]] =
|
proc sameContentsDifferentPaths*(left, right: DirAnalysis): seq[tuple[left, right: FileEntry]] =
|
||||||
## Find all ``FileEntry`` whose contents are the same in both trees but
|
## Find all ``FileEntry`` whose contents are the same in both trees but
|
||||||
## which are located at differenc paths.
|
## which are located at differenc paths.
|
||||||
result = @[]
|
result = @[]
|
||||||
@ -170,69 +194,7 @@ when isMainModule:
|
|||||||
stderr.writeLine("treediff: " & error)
|
stderr.writeLine("treediff: " & error)
|
||||||
quit(QuitFailure)
|
quit(QuitFailure)
|
||||||
|
|
||||||
let doc = """
|
let args = docopt(USAGE, version = "treediff " & VERSION)
|
||||||
Usage:
|
|
||||||
treediff <left> [<right>] [options]
|
|
||||||
treediff (-h | --help)
|
|
||||||
treediff (-V | --version)
|
|
||||||
|
|
||||||
<left> and <right> represent paths to directory roots to be compared. If one
|
|
||||||
of these paths points to a file instead of a directory, treediff assumes that
|
|
||||||
the file represents a saved directory analysis to be loaded in place of a
|
|
||||||
directory to compare. For example:
|
|
||||||
|
|
||||||
treediff /path/to/dir /path/to/output.json
|
|
||||||
|
|
||||||
will analyze the directory tree at '/path/to/dir' to create the left-side
|
|
||||||
analysis and load a pre-existing analysis from '/path/to/output.json' as the
|
|
||||||
right-side analysis.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-h --help Show this usage information.
|
|
||||||
-V --version Show the program version.
|
|
||||||
-v --verbose Enable verbose output.
|
|
||||||
-q --quiet Suppress all output and error messages except for the
|
|
||||||
progress indicator.
|
|
||||||
-Q --very-quiet Suppress all output and error messages includeing the
|
|
||||||
progress indicator.
|
|
||||||
|
|
||||||
-1 --save-left <left_out> Save the left analysis to <left_out> (will be
|
|
||||||
formatted as JSON)
|
|
||||||
-2 --save-right <right_out> Save the right analysis to <right_out> (will be
|
|
||||||
formatted as JSON)
|
|
||||||
|
|
||||||
-s --same
|
|
||||||
-S --exclude-same
|
|
||||||
|
|
||||||
Show or hide information about files which are the same in both trees.
|
|
||||||
|
|
||||||
-c --content-mismatch
|
|
||||||
-C --exclude-content-mismatch
|
|
||||||
|
|
||||||
Show or hide information about files whose relative paths are the same
|
|
||||||
in both trees but whose contents differ.
|
|
||||||
|
|
||||||
-p --path-mismatch
|
|
||||||
-P --exclude-path-mismatch
|
|
||||||
|
|
||||||
Show or hide information about files whose contents are the same in both
|
|
||||||
trees but whose relative paths differ.
|
|
||||||
|
|
||||||
-l --left-only
|
|
||||||
-L --exclude-left-only
|
|
||||||
|
|
||||||
Show or hide information about files which are found only in the left
|
|
||||||
tree.
|
|
||||||
|
|
||||||
-r --right-only
|
|
||||||
-R --exclude-right-only
|
|
||||||
|
|
||||||
Show or hide information about files which are found only in the right
|
|
||||||
tree.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
let args = docopt(doc, version = "treediff v1.4.3")
|
|
||||||
|
|
||||||
var verbosity = normal
|
var verbosity = normal
|
||||||
if args["--quiet"]: verbosity = quiet
|
if args["--quiet"]: verbosity = quiet
|
||||||
@ -253,7 +215,7 @@ Options:
|
|||||||
if fileInfo.kind == pcDir:
|
if fileInfo.kind == pcDir:
|
||||||
return analyzeDir(path, progressWrapper)
|
return analyzeDir(path, progressWrapper)
|
||||||
elif fileInfo.kind == pcFile:
|
elif fileInfo.kind == pcFile:
|
||||||
loadAnalysis(path, result)
|
result = loadAnalysis(path)
|
||||||
else:
|
else:
|
||||||
quitWithError($path & ": is not a file or directory")
|
quitWithError($path & ": is not a file or directory")
|
||||||
|
|
||||||
@ -263,8 +225,8 @@ Options:
|
|||||||
|
|
||||||
if not args["<right>"]:
|
if not args["<right>"]:
|
||||||
rightAnalysis = (allEntries: @[],
|
rightAnalysis = (allEntries: @[],
|
||||||
byRelPath: newTable[string, ref FileEntry](),
|
byRelPath: newTable[string, FileEntry](),
|
||||||
byChecksum: newTable[string, seq[ref FileEntry]]())
|
byChecksum: newTable[string, seq[FileEntry]]())
|
||||||
else:
|
else:
|
||||||
var rightPath: string = $args["<right>"]
|
var rightPath: string = $args["<right>"]
|
||||||
rightAnalysis = loadPath(rightPath)
|
rightAnalysis = loadPath(rightPath)
|
||||||
@ -275,7 +237,7 @@ Options:
|
|||||||
|
|
||||||
if args["--save-right"] and rightAnalysis.allEntries.len > 0:
|
if args["--save-right"] and rightAnalysis.allEntries.len > 0:
|
||||||
saveAnalysis($args["--save-right"], rightAnalysis)
|
saveAnalysis($args["--save-right"], rightAnalysis)
|
||||||
|
|
||||||
# Parse filter options
|
# Parse filter options
|
||||||
var displayOptions: DisplayOptions = (
|
var displayOptions: DisplayOptions = (
|
||||||
left: false, right: false, same: false, content: false, path: false)
|
left: false, right: false, same: false, content: false, path: false)
|
||||||
@ -320,4 +282,3 @@ Options:
|
|||||||
if displayOptions.right:
|
if displayOptions.right:
|
||||||
let rightOnly = rightAnalysis - leftAnalysis
|
let rightOnly = rightAnalysis - leftAnalysis
|
||||||
for fe in rightOnly: echo "right only: ", fe.relPath
|
for fe in rightOnly: echo "right only: ", fe.relPath
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Package
|
# Package
|
||||||
version = "1.4.3"
|
version = "2.0.1"
|
||||||
author = "Jonathan Bernard (jdb@jdb-labs.com)"
|
author = "Jonathan Bernard (jdb@jdb-labs.com)"
|
||||||
description = "Utility to generate diffs of full directory trees."
|
description = "Utility to generate diffs of full directory trees."
|
||||||
license = "BSD"
|
license = "BSD"
|
||||||
@ -7,4 +7,10 @@ bin = @["treediff"]
|
|||||||
srcDir = "src/main/nim"
|
srcDir = "src/main/nim"
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
requires: @["nim >= 0.13.0", "docopt >= 0.1.0", "console_progress >= 1.2.1"]
|
requires: @["nim >= 2.0.0", "docopt == 0.7.1", "checksums"]
|
||||||
|
|
||||||
|
# Dependencies from git.jdb-software.com/jdb/nim-packages
|
||||||
|
requires: @["console_progress >= 1.2.2", "update_nim_package_version"]
|
||||||
|
|
||||||
|
task updateVersion, "Update the version of this package.":
|
||||||
|
exec "update_nim_package_version treediff 'src/main/nim/cliconstants.nim'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user