-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
102 lines (82 loc) · 2.59 KB
/
Copy pathTaskfile.yml
File metadata and controls
102 lines (82 loc) · 2.59 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: "3"
tasks:
default:
desc: Show available tasks
cmds:
- task --list
setup:
desc: One-time dev setup — install git hooks (fmt on commit, clippy on push)
cmds:
- git config core.hooksPath .githooks
- echo "✓ git hooks installed (core.hooksPath → .githooks)"
build:
desc: Build (debug)
cmd: cargo build
build-release:
desc: Build (release)
cmd: cargo build --release
build-all:
desc: Build with all features (llu + nightscout + mqtt)
cmd: cargo build --features "source-llu sink-nightscout sink-mqtt"
test:
desc: Run tests
cmd: cargo test
test-all:
desc: Run tests with all features
cmd: cargo test --all-features
test-verbose:
desc: Run tests with output
cmd: cargo test --all-features -- --nocapture
lint:
desc: Run clippy (warnings as errors)
cmd: cargo clippy --all-targets -- -D warnings
fmt:
desc: Format code
cmd: cargo fmt --all
fmt-check:
desc: Check formatting without applying
cmd: cargo fmt --all -- --check
audit:
desc: Check dependencies (cargo-deny)
cmd: cargo deny check
check:
desc: fmt + lint + test
cmds:
- task: fmt
- task: lint
- task: test-all
run:
desc: Run with default config
cmd: cargo run -- run
run-config:
desc: Run with config.toml
cmd: cargo run -- run -c config.toml
docker:
desc: Build container image (gluco-hub:dev)
cmd: docker build -t gluco-hub:dev .
# CalVer release workflow (YYYY.0M0D.PATCH, e.g. 2026.510.0 = 2026-05-10).
# Version is derived from UTC date; PATCH bumps cover same-day re-releases.
release:dry:
desc: "Preview today's CalVer release (dry-run, no tag/push)"
vars:
VERSION:
sh: date -u +%Y.%-m%d.0
preconditions:
- sh: command -v cargo-release >/dev/null 2>&1
msg: "cargo-release not installed. Run: cargo install cargo-release"
cmd: cargo release "{{.VERSION}}"
release:
desc: "Cut today's CalVer release (UTC date → YYYY.0M0D.0, commits + tags + pushes)"
vars:
VERSION:
sh: date -u +%Y.%-m%d.0
preconditions:
- sh: command -v cargo-release >/dev/null 2>&1
msg: "cargo-release not installed. Run: cargo install cargo-release"
cmd: cargo release "{{.VERSION}}" --execute --no-confirm
release:patch:
desc: "Same-day hotfix (bumps PATCH, e.g. 2026.510.0 → 2026.510.1)"
preconditions:
- sh: command -v cargo-release >/dev/null 2>&1
msg: "cargo-release not installed. Run: cargo install cargo-release"
cmd: cargo release patch --execute --no-confirm