File tree Expand file tree Collapse file tree 8 files changed +15288
-13930
lines changed
Expand file tree Collapse file tree 8 files changed +15288
-13930
lines changed Original file line number Diff line number Diff line change 11<# #>
22param (
3- [Parameter (Mandatory = $true )]
3+ [Parameter (Mandatory = $true )]
44 [string ]$CMD ,
55
66 [string ]$peri
77)
88
9- $REV = " 1659e761beb29d3949bd1ec72039c3ce5f6bdf6c "
9+ $REV = " db4473fae6a41fcad7f5c824dcaadba3a6e060e9 "
1010
11- Switch ($CMD )
12- {
11+ Switch ($CMD ) {
1312 " download-all" {
1413 rm - r - Force ./ sources/ - ErrorAction SilentlyContinue
1514 git clone https:// github.com / embassy- rs/ stm32- data- sources.git ./ sources/
@@ -33,7 +32,8 @@ Switch ($CMD)
3332 if ($LASTEXITCODE -eq 0 ) {
3433 rm " tmp/$peri /$f .err"
3534 echo OK
36- } else {
35+ }
36+ else {
3737 rm " tmp/$peri /$f .yaml"
3838 echo FAIL
3939 }
@@ -44,7 +44,18 @@ Switch ($CMD)
4444 rm - r - Force build/ data - ErrorAction SilentlyContinue
4545 cargo run -- release -- bin stm32- data- gen
4646 }
47+ " gen-all" {
48+ rm - r - Force build/ data - ErrorAction SilentlyContinue
49+ rm - r - Force build/ stm32- metapac - ErrorAction SilentlyContinue
50+ cargo run -- release -- bin stm32- data- gen
51+ cargo run -- release -- bin stm32- metapac- gen
52+ cd build/ stm32- metapac
53+
54+ $files = ls - Recurse - Filter ' *.rs' | Where-Object { $_.FullName -notmatch ' target' } | % { $_.FullName } | Resolve-Path - Relative
55+ $counter = [pscustomobject ] @ { Value = 0 }
56+ $files | Group-Object - Property { [math ]::Floor($counter.Value ++ / 200 ) } | % { rustfmt -- skip-children -- unstable- features -- edition 2021 $_.Group }
57+ }
4758 default {
4859 echo " unknown command"
4960 }
50- }
61+ }
You can’t perform that action at this time.
0 commit comments