2023-11-10 13:51:30 -06:00
|
|
|
import std/[strformat, strutils]
|
|
|
|
|
|
|
|
|
2024-09-13 11:17:14 -05:00
|
|
|
task debugSelect, "debug select":
|
2024-09-19 18:02:59 -05:00
|
|
|
exec "nim -d:debugSelect c -r src/selector.nim"
|
2023-11-10 13:51:30 -06:00
|
|
|
|
|
|
|
task build, "build app":
|
|
|
|
selfExec "c -o:bin/tsm src/tsm.nim"
|
|
|
|
|
2024-09-19 18:02:59 -05:00
|
|
|
task buildRelease, "build release app":
|
2024-03-18 16:19:33 -05:00
|
|
|
selfExec "c -d:release -o:bin/tsm src/tsm.nim"
|
|
|
|
|
2024-09-19 18:02:59 -05:00
|
|
|
task release, "build release assets w/forge":
|
2023-11-10 13:51:30 -06:00
|
|
|
version = (gorgeEx "git describe --tags --always --match 'v*'").output
|
|
|
|
exec &"forge release -v {version} -V"
|
|
|
|
|
2024-09-19 18:02:59 -05:00
|
|
|
task bundle, "package forge build assets":
|
2023-11-10 13:51:30 -06:00
|
|
|
withDir "dist":
|
|
|
|
for dir in listDirs("."):
|
|
|
|
echo dir
|
2024-09-13 14:22:06 -05:00
|
|
|
let cmd =
|
|
|
|
if "windows" in dir: &"7z a {dir}.zip {dir}"
|
|
|
|
else: &"tar czf {dir}.tar.gz {dir}"
|
2023-11-10 13:51:30 -06:00
|
|
|
cpFile("../README.md", &"{dir}/README.md")
|
|
|
|
exec cmd
|
|
|
|
|
|
|
|
|
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
|