agtest/run.ps1

16 lines
509 B
PowerShell
Raw Normal View History

#blessed https://stackoverflow.com/a/52784160
function Invoke-Call {
param (
[scriptblock]$ScriptBlock,
[string]$ErrorAction = $ErrorActionPreference
)
& @ScriptBlock
if (($lastexitcode -ne 0) -and $ErrorAction -eq "Stop") {
exit $lastexitcode
}
}
Invoke-Call -ScriptBlock {mypy (get-item *.py) } -ErrorAction Stop
2021-06-13 23:28:28 +00:00
Invoke-Call -ScriptBlock {python agmain.py } -ErrorAction Stop
Invoke-Call -ScriptBlock {mypy (get-item gen/*.py) } -ErrorAction Stop