-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathjustfile
More file actions
102 lines (75 loc) 路 2.78 KB
/
Copy pathjustfile
File metadata and controls
102 lines (75 loc) 路 2.78 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
##
# Examples
##
desktop-1d-rainbow:
cargo run --release --example 1d-rainbow
desktop-2d-rainbow:
cargo run --release --example 2d-rainbow
desktop-2d-noise:
cargo run --release --example 2d-noise
desktop-3d-cube-face-noise:
cargo run --release --example 3d-cube-face-noise
desktop-3d-cube-volume-rainbow:
cargo run --release --example 3d-cube-volume-rainbow
desktop-3d-cube-volume-noise:
cargo run --release --example 3d-cube-volume-noise
desktop-3d-arcs:
cargo run --release --example 3d-arcs
desktop-button:
cargo run --release --example 1d-button
gledopto-ws2812-strip:
cd esp && cargo run --release -p gledopto --example ws2812-strip --features gl_c_016wl_d
gledopto-ws2812-strip-embassy:
cd esp && cargo run --release -p gledopto --example ws2812-strip-embassy --features gl_c_016wl_d,embassy
gledopto-apa102-grid:
cd esp && cargo run --release -p gledopto --example apa102-grid --features gl_c_016wl_d
gledopto-apa102-grid-embassy:
cd esp && cargo run --release -p gledopto --example apa102-grid-embassy --features gl_c_016wl_d,embassy
gledopto-ws2812-face-cube:
cd esp && cargo run --release -p gledopto --example ws2812-face-cube --features gl_c_016wl_d
gledopto-ws2812-face-cube-embassy:
cd esp && cargo run --release -p gledopto --example ws2812-face-cube-embassy --features gl_c_016wl_d,embassy
gledopto-ws2812-volume-cube:
cd esp && cargo run --release -p gledopto --example ws2812-volume-cube --features gl_c_016wl_d
gledopto-ws2812-face-button-composite:
cd esp && cargo run --release -p gledopto --example ws2812-face-button-composite --features gl_c_016wl_d
##
# Testing
##
test-core:
cargo test
check-esp:
cd esp && cargo check -F esp32 -F gl_c_016wl_d
test-esp: check-esp
cd esp && cargo test --doc -F esp32 -F gl_c_016wl_d
doc-esp:
cd esp && cargo doc -F esp32 -F gl_c_016wl_d --open
##
# Releasing
##
# List all crates in the project
crates:
@echo "Root workspace crates:"
@find . -name "Cargo.toml" -not -path "./Cargo.toml" -not -path "./esp/*" -not -path "./target/*" | sort
@echo "\nESP workspace crates:"
@find ./esp -name "Cargo.toml" -not -path "./esp/Cargo.toml" -not -path "*/target/*" | sort
# Create a tag for a crate release
tag crate:
#!/usr/bin/env bash
set -euo pipefail
CRATE_TOML=$(find . \
-path "./{{crate}}/Cargo.toml" \
-o -path "./esp/{{crate}}/Cargo.toml" \
| head -n1)
if [ -z "$CRATE_TOML" ]; then
echo "Crate {{crate}} not found!" >&2
exit 1
fi
# Extract current version
VERSION=$(grep '^version = ' "$CRATE_TOML" | sed -E 's/version = "(.*)"/\1/')
if [ -z "$VERSION" ]; then
echo "Failed to extract current version from $CRATE_TOML" >&2
exit 1
fi
echo "Creating tag {{crate}}/v$VERSION" >&2
git tag {{crate}}/v$VERSION