forge/config.nims

25 lines
690 B
Text
Raw Normal View History

2024-09-26 17:21:52 -05:00
import std/[strformat, strutils]
task build, "build":
exec "nim c --outdir:bin src/forge.nim"
task release, "build release assets":
version = (gorgeEx "git describe --tags --always --match 'v*'").output
2024-11-07 00:15:06 -06:00
exec fmt"forge release --version {version} --verbose"
2024-09-26 17:21:52 -05:00
task bundle, "package build assets":
withDir "dist":
for dir in listDirs("."):
let cmd =
if "windows" in dir: fmt"7z a {dir}.zip {dir}"
else: fmt"tar czf {dir}.tar.gz {dir}"
cpFile("../README.md", fmt"{dir}/README.md")
exec cmd
# begin Nimble config (version 2)
--noNimblePath
when withDir(thisDir(), system.fileExists("nimble.paths")):
include "nimble.paths"
# end Nimble config