-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathngm.nimble
28 lines (23 loc) · 921 Bytes
/
ngm.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version = "0.0.1"
author = "carrexxii"
description = "Nim maths library designed for games and graphics"
license = "Apache 2.0"
#[ -------------------------------------------------------------------- ]#
import std/strformat
task build_docs, "Build the project's docs":
exec "nim md2html --index:only --outdir:docs docs/*.md"
exec "nim md2html --outdir:docs docs/*.md"
let git_hash = (gorge_ex "git rev-parse HEAD").output
exec &"nim doc --project --index:on --git.url:https://github.com/carrexxii/ngm --git.commit:{git_hash} --outdir:docs ngm.nim"
exec "cp docs/theindex.html docs/index.html"
task update_docs, "Update the docs branch":
try:
exec "git stash"
exec "git checkout docs"
exec "git add docs/**"
exec "git commit -m \".\""
except OsError:
discard
finally:
exec "git checkout master"
exec "git stash pop"