mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 23:41:29 +00:00
koch now ignores the existance of .git and always builds the latest tagged stable release of Nimble unless you use the --latest switch; fixes #11402; fixes #9017
This commit is contained in:
@@ -270,6 +270,8 @@ proc enumToString*(enums: openArray[enum]): string =
|
||||
documentation.
|
||||
- `nimpretty`: --backup now defaults to `off` instead of `on` and the flag was
|
||||
un-documented; use `git` instead of relying on backup files.
|
||||
- `koch` now defaults to build the latest *stable* Nimble version unless you
|
||||
explicitly ask for the latest master version via `--latest`.
|
||||
|
||||
|
||||
### Compiler changes
|
||||
|
||||
13
koch.nim
13
koch.nim
@@ -41,7 +41,7 @@ Usage:
|
||||
Options:
|
||||
--help, -h shows this help and quits
|
||||
--latest bundle the installers with a bleeding edge Nimble
|
||||
--stable bundle the installers with a stable Nimble
|
||||
--stable bundle the installers with a stable Nimble (default)
|
||||
Possible Commands:
|
||||
boot [options] bootstraps with given command line options
|
||||
distrohelper [bindir] helper for distro packagers
|
||||
@@ -583,18 +583,13 @@ proc showHelp() =
|
||||
when isMainModule:
|
||||
var op = initOptParser()
|
||||
var latest = false
|
||||
var stable = false
|
||||
template isLatest(): bool =
|
||||
if stable: false
|
||||
else:
|
||||
existsDir(".git") or latest
|
||||
while true:
|
||||
op.next()
|
||||
case op.kind
|
||||
of cmdLongOption, cmdShortOption:
|
||||
case normalize(op.key)
|
||||
of "latest": latest = true
|
||||
of "stable": stable = true
|
||||
of "stable": latest = false
|
||||
else: showHelp()
|
||||
of cmdArgument:
|
||||
case normalize(op.key)
|
||||
@@ -618,13 +613,13 @@ when isMainModule:
|
||||
of "temp": temp(op.cmdLineRest)
|
||||
of "xtemp": xtemp(op.cmdLineRest)
|
||||
of "wintools": bundleWinTools()
|
||||
of "nimble": buildNimble(isLatest())
|
||||
of "nimble": buildNimble(latest)
|
||||
of "nimsuggest": bundleNimsuggest()
|
||||
of "toolsnonimble":
|
||||
buildTools()
|
||||
of "tools":
|
||||
buildTools()
|
||||
buildNimble(isLatest())
|
||||
buildNimble(latest)
|
||||
of "pushcsource", "pushcsources": pushCsources()
|
||||
of "valgrind": valgrind(op.cmdLineRest)
|
||||
of "c2nim": bundleC2nim()
|
||||
|
||||
Reference in New Issue
Block a user