-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.nims
35 lines (28 loc) · 1.08 KB
/
config.nims
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
29
30
31
32
33
34
35
import std/[os, strutils]
task runWsGenerated, "Run creation script for ws_generated":
exec "nim c -r wsGenerated"
task runWsIntegration, "Run creation script for ws_integration":
exec "nim c -r wsIntegration"
task atlasTestsCreate, "Create a atlas-tests zipped cache":
exec "nim c -r createTestReposZip"
task atlasTestsSetup, "Setup atlas-tests from a cached zip":
exec "nim c -r downloadTestRepos"
task clean, "Clean all":
rmDir("atlas-tests/ws_generated")
rmDir("atlas-tests/ws_integration")
task cleanDist, "Clean all":
rmDir("atlas-tests/working")
rmDir("atlas-tests/working")
mkDir("atlas-tests")
writeFile("atlas-tests/.gitkeep", "")
for item in walkDir("."):
if item.kind == pcFile and item.path.endsWith(".zip"):
rmFile(item.path)
task atlasTestsVersion, "Get version":
let nimble = readFile("atlas_tests.nimble")
var ver = ""
for line in nimble.split("\n"):
if line.startsWith("version ="):
ver = line.replace("\"", "").split("=")[1].strip()
doAssert ver != "" and " " notin ver and ver.len() < 10, "need to provide atlas version"
echo ver