-
Notifications
You must be signed in to change notification settings - Fork 1
/
scripts.yml
82 lines (80 loc) · 2.25 KB
/
scripts.yml
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
# Velociraptor script – @see https://velociraptor.run/docs/introduction/
scripts:
warmup:
desc: Warm up Deno cache
cmd: deno cache deps.ts dev_deps.ts
reload: false
lock: lock.json
lint:
desc: Lint all code
cmd: deno lint
format:
desc: Format check all code
cmd: deno fmt --check --ignore="lock.json,cov_profile/"
format:fix:
desc: Format & fix all code
cmd: deno fmt --ignore="lock.json,cov_profile/"
test:
desc: Run all tests
cmd: deno test
reload: false
cachedOnly: true
lock: lock.json
allow:
- env
- read
- write
coverage:
- desc: Run tests and generate coverage data
cmd: deno test --shuffle --coverage=cov_profile
reload: false
cachedOnly: true
lock: lock.json
allow:
- env
- read
- write
- desc: Generate lcov data for coverage
cmd: deno coverage cov_profile --exclude="deps.ts" --exclude="dev_deps.ts" --exclude="test/**" --lcov > cov_profile.lcov
compile:
desc: Compile binary for all platforms
pll:
- deno compile --output dist/cwc-linux --target x86_64-unknown-linux-gnu cli.ts
- deno compile --output dist/cwc-apple-intel --target x86_64-apple-darwin cli.ts
- deno compile --output dist/cwc-apple-arm --target aarch64-apple-darwin cli.ts
- deno compile --output dist/cwc-windows --target x86_64-pc-windows-msvc cli.ts
reload: false
cachedOnly: true
lock: lock.json
allow:
- env
- read
- write
- net: www.googleapis.com
# Git hooks
pre-commit:
desc: Pre-commit hook that makes sure the code is linted and formatted
pll:
- vr lint
- vr format
gitHook: pre-commit
# Utility scripts
install:
desc: Install all dependencies
cmd: deno cache deps.ts dev_deps.ts
reload: true
lock: lock.json
reload:
desc: Reload dependency cache and update lock file
cmd: deno cache --lock-write deps.ts dev_deps.ts
reload: true
lock: lock.json
update:
- desc: Update all dependencies
cmd: deno run https://deno.land/x/[email protected]/main.ts dev_deps.ts deps.ts
allow:
- read
- write
- net
- desc: Reload dependency cache and update lock file
cmd: vr reload