mirror of
https://github.com/nuttytree/ESPHome-Devices.git
synced 2025-07-25 02:54:29 +00:00
Compile all devices script (#23)
This commit is contained in:
22
scripts/compile_all_devices.ps1
Normal file
22
scripts/compile_all_devices.ps1
Normal file
@ -0,0 +1,22 @@
|
||||
Push-Location $PSScriptRoot\..\devices
|
||||
|
||||
$files = Get-ChildItem "*.yaml" -Exclude "secrets.yaml"
|
||||
$failures = New-Object Collections.Generic.List[String]
|
||||
foreach ($file in $files) {
|
||||
esphome compile $file.Name
|
||||
if ($LASTEXITCODE -ne "0") {
|
||||
$failures.Add($file.Name)
|
||||
}
|
||||
}
|
||||
|
||||
if ($failures -eq 0) {
|
||||
Write-Output "`n`nAll devices compiled successfully"
|
||||
}
|
||||
else {
|
||||
Write-Output "`n`nThe following devices failed to compile:"
|
||||
foreach ($failure in $failures) {
|
||||
Write-Output $failure
|
||||
}
|
||||
}
|
||||
|
||||
Pop-Location
|
Reference in New Issue
Block a user