tsm/config.nims

38 lines
959 B
Text
Raw Normal View History

2023-11-10 13:51:30 -06:00
import std/[strformat, strutils]
2023-09-05 13:36:33 -05:00
task debugTui, "debug tui":
exec "nim -d:debug c -r src/tui.nim"
2023-11-10 13:51:30 -06:00
task build, "build app":
selfExec "c -o:bin/tsm src/tsm.nim"
2024-03-18 16:19:33 -05:00
task buildRelease, "build app":
selfExec "c -d:release -o:bin/tsm src/tsm.nim"
2023-11-10 13:51:30 -06:00
task release, "build release assets":
version = (gorgeEx "git describe --tags --always --match 'v*'").output
exec &"forge release -v {version} -V"
task updateNixLock, "regenerate nix/lock.json":
exec "nix run github:daylinmorgan/nnl nimble.lock > nix/lock.json"
2023-11-10 13:51:30 -06:00
task bundle, "package build assets":
withDir "dist":
for dir in listDirs("."):
echo dir
let cmd = if "windows" in dir:
&"7z a {dir}.zip {dir}"
else:
&"tar czf {dir}.tar.gz {dir}"
cpFile("../README.md", &"{dir}/README.md")
exec cmd
2024-03-19 11:57:34 -05:00
2024-03-18 16:19:33 -05:00
# begin Nimble config (version 2)
--noNimblePath
when withDir(thisDir(), system.fileExists("nimble.paths")):
include "nimble.paths"
# end Nimble config