-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
taskfile.yaml
76 lines (63 loc) · 2.4 KB
/
taskfile.yaml
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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
tasks:
# check*
check:lock:
desc: "🔍 Checking lock file consistency with 'pyproject.toml'"
cmd: uv lock --locked
check:lint:
desc: "🔍 Linting code: Running pre-commit"
cmd: pre-commit run -a
check:mypy:
desc: "🔍 Static type checking: Running mypy"
cmd: mypy
check:deptry:
desc: "🔍 Checking for obsolete dependencies: Running deptry"
cmd: deptry .
check:
desc: "🔍 Run all checks"
cmds:
- task: check:lock
- task: check:lint
- task: check:mypy
- task: check:deptry
## build:docker:*
build:docker:arm64:
desc: "🏗️ Build docker image for linux/arm64"
cmds:
- docker buildx build --platform "linux/arm64" -t toogoodtogo_ha_mqtt_bridge:localdev-arm64 .
build:docker:amd64:
desc: "🏗️ Build docker image for linux/amd64"
cmds:
- docker buildx build --platform "linux/amd64" -t toogoodtogo_ha_mqtt_bridge:localdev-amd64 .
build:docker:arm7:
desc: "🏗️ Build docker image for linux/arm/v7"
cmds:
- docker buildx build --platform "linux/arm/v7" -t toogoodtogo_ha_mqtt_bridge:localdev-arm7 .
build:
desc: 🏗️ Build for all archs
cmds:
- task: build:docker:arm64
- task: build:docker:amd64
- task: build:docker:arm7
## run:docker:*
run:docker:arm64:
desc: "▶️ Build and run for linux/arm64"
dir: toogoodtogo_ha_mqtt_bridge
deps: ["build:docker:arm64"]
cmd: docker run --rm -ti -v $PWD/settings.local.json:/app/settings.local.json -v $PWD/data/:/data -v /etc/localtime:/etc/localtime:ro toogoodtogo_ha_mqtt_bridge:localdev-arm64
run:docker:amd64:
desc: "▶️ Build and run for linux/amd64"
dir: toogoodtogo_ha_mqtt_bridge
deps: ["build:docker:amd64"]
cmd: docker run --rm -ti -v $PWD/settings.local.json:/app/settings.local.json -v $PWD/data/:/data -v /etc/localtime:/etc/localtime:ro toogoodtogo_ha_mqtt_bridge:localdev-amd64
run:docker:arm7:
desc: "▶️ Build and run for linux/arm7"
dir: toogoodtogo_ha_mqtt_bridge
deps: ["build:docker:arm7"]
cmd: docker run --rm -ti -v $PWD/settings.local.json:/app/settings.local.json -v $PWD/data/:/data -v /etc/localtime:/etc/localtime:ro toogoodtogo_ha_mqtt_bridge:localdev-arm7
## run
run:
desc: "▶️ Run natively"
dir: toogoodtogo_ha_mqtt_bridge
cmd: uv run main.py