-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
44 lines (37 loc) · 1.03 KB
/
Taskfile.yaml
File metadata and controls
44 lines (37 loc) · 1.03 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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
# vars:
# PROFILE: Hello, world!
# REGION: Hello, world!
tasks:
default:
desc: Print a greeting message
cmds:
- echo "{{.GREETING}}"
silent: true
build: go build -o ./taws .
run:*:*:
desc: "Build and run profile and region"
vars:
PROFILE: "{{index .MATCH 0}}"
REGION: "{{index .MATCH 1}}"
cmds:
- task: build
- ./taws --profile "{{.PROFILE}}" --region "{{.REGION}}"
debug:*:*:
desc: "Build and debug with profile and region"
vars:
PROFILE: "{{index .MATCH 0}}"
REGION: "{{index .MATCH 1}}"
cmds:
- task: build
- dlv ./taws --profile "{{.PROFILE}}" --region "{{.REGION}}"
log:
cmds:
- rm -f ./tmp/log.log
- |
tail -F ./tmp/log.log | sed -E \
-e $'s/level=ERROR/\033[31m&\033[0m/' \
-e $'s/level=WARN/\033[33m&\033[0m/' \
-e $'s/level=INFO/\033[32m&\033[0m/' \
-e $'s/level=DEBUG/\033[90m&\033[0m/'