-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
46 lines (41 loc) · 1.62 KB
/
Taskfile.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
version: '3'
tasks:
# list modified files
diff:
desc: List all changed files.
cmds:
- git ls-files --modified
# prepare configuration files
prepare:
desc: Prepare configuration files for config-check workflow.
cmds:
- task: disable:secrets
- task: disable:integrations
- task: disable:automations
# replace secret references
disable:secrets:
desc: Disable all secret references because they can not be resolved during config-check.
cmds:
- sed -E -i 's/!secret ([a-z0-9_]+)/"\1"/' config/*.yaml
- sed -E -i 's/!secret ([a-z0-9_]+)/"\1"/' config/**/*.yaml
# disable config files
disable:integrations:
desc: Disable http and homekit integrations because they rely on external resources.
cmds:
- mv config/integrations/homekit.yaml{,.disabled}
- mv config/integrations/http.yaml{,.disabled}
status:
- test -f config/integrations/homekit.yaml.disabled
- test -f config/integrations/http.yaml.disabled
disable:automations:
desc: Disable all automations containing a reference to a blueprint.
cmds:
- mv config/automations/battery-check.yaml{,.disabled}
- mv config/automations/bedroom-mini-switch.yaml{,.disabled}
- mv config/automations/love-mini-switch.yaml{,.disabled}
- mv config/automations/office-mini-switch.yaml{,.disabled}
status:
- test -f config/automations/battery-check.yaml.disabled
- test -f config/automations/bedroom-mini-switch.yaml.disabled
- test -f config/automations/love-mini-switch.yaml.disabled
- test -f config/automations/office-mini-switch.yaml.disabled