use release version (#15400)

This commit is contained in:
flywind 2020-09-24 20:14:23 +08:00 • committed by GitHub
commit 8a6c5edc43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,11 +36,11 @@ proc interp*(path: string, nimr: string): string =
doAssert '$' notin result, $(path, nimr, result) # avoids un-interpolated variables in output doAssert '$' notin result, $(path, nimr, result) # avoids un-interpolated variables in output
proc getDocHacksJs*(nimr: string, nim = getCurrentCompilerExe(), forceRebuild = false): string = proc getDocHacksJs*(nimr: string, nim = getCurrentCompilerExe(), forceRebuild = false): string =
## return absolute path to dochhack.js, rebuilding if it doesn't exist or if ## return absolute path to dochack.js, rebuilding if it doesn't exist or if
## `forceRebuild`. ## `forceRebuild`.
let docHackJs2 = docHackJs.interp(nimr = nimr) let docHackJs2 = docHackJs.interp(nimr = nimr)
if forceRebuild or not docHackJs2.fileExists: if forceRebuild or not docHackJs2.fileExists:
let cmd = "$nim js $file" % ["nim", nim.quoteShell, "file", docHackNim.interp(nimr = nimr).quoteShell] let cmd = "$nim js -d:release $file" % ["nim", nim.quoteShell, "file", docHackNim.interp(nimr = nimr).quoteShell]
echo "getDocHacksJs: cmd: " & cmd echo "getDocHacksJs: cmd: " & cmd
doAssert execShellCmd(cmd) == 0, $(cmd) doAssert execShellCmd(cmd) == 0, $(cmd)
doAssert docHackJs2.fileExists doAssert docHackJs2.fileExists