-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
95 lines (72 loc) · 2.25 KB
/
Taskfile.yml
File metadata and controls
95 lines (72 loc) · 2.25 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Be sure to have direnv allow the .envrc file before running this
# OR load the variables from .envrc yourself
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: '3'
includes:
build: ./build/_tasks.yml
specs: ./spec/_tasks.yml
vars:
NIMDEFINE_VER:
"-d:appVersion={{.VERSION_NUM}}"
NIMDEFINE_DEPVERS:
"-d:appDepVersions={{.NIMBLEPKGDEPSVER}}"
NIMDEFINEFLAGS:
"{{.NIMDEFINE_VER}} {{.NIMDEFINE_DEPVERS}}"
tasks:
check_env:
silent: true
cmds:
- 'echo version: $VERSION_NUM'
- 'echo version for nimble $SEMANTIC_VERSION'
- 'echo project in: $PROJECT_DIR'
- 'echo source files: $SOURCE_DIR'
- 'echo nimble package deps: {{.NIMBLEPKGDEPSVER}}'
- 'echo nim define flags: {{.NIMDEFINEFLAGS}}'
- 'echo Unix timestamp: {{now | unixEpoch}}'
# Package Mangement
update-nimble-pkgver:
aliases: [update-saniv]
desc: Sync version number in .nimble file with environment variable as nimble requires variable to be string literal
cmds:
- sed -i 's/^version *= *".*"/version = "{{.SEMANTIC_VERSION}}"/' webdevn.nimble
verify_app_meta_version:
aliases: [metavers]
desc: Get a readout of the version as read by the app
cmds:
- nim r --hints:off {{.NIMDEFINEFLAGS}} $SOURCE_DIR/webdevn.nim -V
check-app-help:
aliases: [chelp]
desc: Print the help message
cmds:
- nim r --hints:off {{.NIMDEFINEFLAGS}} $SOURCE_DIR/webdevn.nim -h
# Running
run_project:
aliases: [runit]
desc: Compiles and executes code with cli args (after '--')
cmds:
- nim r $SOURCE_DIR/webdevn.nim {{.CLI_ARGS}}
# Linting
lint:
desc: A task to check the main(webdevn) module for compile errors
cmds:
- nim check {{.SOURCE_DIR}}/webdevn.nim
lint-cli:
cmds:
- nim check {{.SUBMODULE_DIR}}/cli.nim
lint-localserver:
aliases: [lint-loser]
cmds:
- nim check {{.SUBMODULE_DIR}}/localserver.nim
lint-scribe:
cmds:
- nim check {{.SUBMODULE_DIR}}/scribe.nim
lint-typedefs:
aliases: [lint-typeds]
cmds:
- nim check {{.SUBMODULE_DIR}}/type_defs.nim
lint-utils:
cmds:
- nim check {{.SUBMODULE_DIR}}/utils.nim
lint-meta:
cmds:
- nim check {{.SUBMODULE_DIR}}/meta.nim