koch: add a --stable flag to build Nimble; refs #9017
This commit is contained in:
parent
b2727d03a6
commit
b2b9af6a50
1 changed files with 9 additions and 2 deletions
11
koch.nim
11
koch.nim
|
|
@ -41,6 +41,7 @@ Usage:
|
||||||
Options:
|
Options:
|
||||||
--help, -h shows this help and quits
|
--help, -h shows this help and quits
|
||||||
--latest bundle the installers with a bleeding edge Nimble
|
--latest bundle the installers with a bleeding edge Nimble
|
||||||
|
--stable bundle the installers with a stable Nimble
|
||||||
Possible Commands:
|
Possible Commands:
|
||||||
boot [options] bootstraps with given command line options
|
boot [options] bootstraps with given command line options
|
||||||
distrohelper [bindir] helper for distro packagers
|
distrohelper [bindir] helper for distro packagers
|
||||||
|
|
@ -509,12 +510,14 @@ proc showHelp() =
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
var op = initOptParser()
|
var op = initOptParser()
|
||||||
var latest = false
|
var latest = false
|
||||||
|
var stable = false
|
||||||
while true:
|
while true:
|
||||||
op.next()
|
op.next()
|
||||||
case op.kind
|
case op.kind
|
||||||
of cmdLongOption, cmdShortOption:
|
of cmdLongOption, cmdShortOption:
|
||||||
case normalize(op.key)
|
case normalize(op.key)
|
||||||
of "latest": latest = true
|
of "latest": latest = true
|
||||||
|
of "stable": stable = true
|
||||||
else: showHelp()
|
else: showHelp()
|
||||||
of cmdArgument:
|
of cmdArgument:
|
||||||
case normalize(op.key)
|
case normalize(op.key)
|
||||||
|
|
@ -537,9 +540,13 @@ when isMainModule:
|
||||||
of "temp": temp(op.cmdLineRest)
|
of "temp": temp(op.cmdLineRest)
|
||||||
of "xtemp": xtemp(op.cmdLineRest)
|
of "xtemp": xtemp(op.cmdLineRest)
|
||||||
of "wintools": bundleWinTools()
|
of "wintools": bundleWinTools()
|
||||||
of "nimble": buildNimble(existsDir(".git") or latest)
|
of "nimble":
|
||||||
|
if stable: buildNimble(false)
|
||||||
|
else: buildNimble(existsDir(".git") or latest)
|
||||||
of "nimsuggest": bundleNimsuggest(buildExe=true)
|
of "nimsuggest": bundleNimsuggest(buildExe=true)
|
||||||
of "tools": buildTools(existsDir(".git") or latest)
|
of "tools":
|
||||||
|
if stable: buildTools(false)
|
||||||
|
else: buildTools(existsDir(".git") or latest)
|
||||||
of "pushcsource", "pushcsources": pushCsources()
|
of "pushcsource", "pushcsources": pushCsources()
|
||||||
of "valgrind": valgrind(op.cmdLineRest)
|
of "valgrind": valgrind(op.cmdLineRest)
|
||||||
else: showHelp()
|
else: showHelp()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue