-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
40 lines (33 loc) · 901 Bytes
/
Taskfile.yml
File metadata and controls
40 lines (33 loc) · 901 Bytes
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
version: '3'
vars:
SCRIPTS: bin/tt.sh
CONFIG: ./example-tt-chain.conf
SHELLCHECK: '{{.SHELLCHECK | default "shellcheck"}}'
SHFMT: '{{.SHFMT | default "shfmt"}}'
tasks:
default:
desc: Show available tasks
cmds:
- task --list
run:
desc: Run tunnel (override with CONFIG=./your.conf)
cmds:
- bin/tt.sh {{.CONFIG}}
lint:
desc: Run shellcheck on Bash scripts
preconditions:
- sh: command -v {{.SHELLCHECK}}
msg: shellcheck not found. Install from https://www.shellcheck.net/ or your package manager.
cmds:
- '{{.SHELLCHECK}} {{.SCRIPTS}}'
format:
desc: Format Bash scripts with shfmt
preconditions:
- sh: command -v {{.SHFMT}}
msg: shfmt not found. Install from https://github.com/mvdan/sh
cmds:
- '{{.SHFMT}} -w {{.SCRIPTS}}'
help:
desc: Print task list
cmds:
- task --list