Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
76 lines (69 loc) 路 1.84 KB
/
Copy pathTaskfile.yml
File metadata and controls
76 lines (69 loc) 路 1.84 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
# https://taskfile.dev
version: "3"
dotenv:
- ~/export-esp.sh
vars:
IMAGE: ../../apps/firefly-updates/firefly-main
tasks:
install-espflash:
status:
- which cargo-espflash
cmds:
- cargo install cargo-espflash
build:
desc: Build firmware and save it in the firefly-updates directory.
cmds:
- >
cargo espflash save-image
--skip-update-check
--features v3
--chip esp32s3
--release
{{.IMAGE}}
release:
desc: build and publish release
cmds:
- task: build
- test {{.CLI_ARGS}}
- grep -F '"{{.CLI_ARGS}}"' Cargo.toml
- git tag {{.CLI_ARGS}}
- git push
- git push --tags
- gh release create --generate-notes {{.CLI_ARGS}}
- gzip -kfc {{.IMAGE}} > firefly-main.gz
- defer: rm firefly-main.gz
- gh release upload {{.CLI_ARGS}} firefly-main.gz
write-serial:
desc: Write the serial number to the device's flash.
cmds:
- task: install-espflash
- python3 -c 'open("/tmp/serial.txt", "wb").write((1337).to_bytes(4))'
- defer: rm /tmp/serial.txt
- >
cargo espflash write-bin
--skip-update-check
--chip esp32s3
0x10000
/tmp/serial.txt
flash:
desc: Build the firmware and write it to the device connected via USB.
cmds:
- task: install-espflash
- task: write-serial
# Switch OTA to the factory slot
- >
cargo espflash erase-parts
--partition-table partitions.csv
otadata
- >
cargo espflash flash
--skip-update-check
--chip esp32s3
--partition-table partitions.csv
--target-app-partition factory
--release
{{.CLI_ARGS}}
monitor:
cmds:
- task: install-espflash
- cargo espflash monitor {{.CLI_ARGS}}