Add PyInstaller release workflow
This commit is contained in:
parent
fefe3a1567
commit
c5373aa9e0
9 changed files with 320 additions and 3 deletions
27
tools/build-windows.ps1
Normal file
27
tools/build-windows.ps1
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Set-Location (Split-Path -Parent $PSScriptRoot)
|
||||
|
||||
$python = Join-Path $PWD '.venv\Scripts\python.exe'
|
||||
if (-not (Test-Path $python)) {
|
||||
python -m venv .venv
|
||||
}
|
||||
|
||||
& $python -m pip install --upgrade pip
|
||||
& $python -m pip install -e '.[build]'
|
||||
|
||||
& $python -m PyInstaller --clean --noconfirm 'packaging\NTE History Exporter.spec'
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "PyInstaller failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
$exe = Join-Path $PWD 'dist\nte-history-exporter.exe'
|
||||
if (-not (Test-Path $exe)) {
|
||||
throw "Expected build output was not created: $exe"
|
||||
}
|
||||
|
||||
Write-Host "Built $exe"
|
||||
& $exe --help
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Built executable smoke test failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue