2023-08-23 16:39:50 +01:00
|
|
|
function Compress-Builds {
|
2023-08-23 16:43:00 +01:00
|
|
|
$target = Join-Path -Path $PSScriptRoot -ChildPath "dist"
|
2023-08-23 16:39:50 +01:00
|
|
|
@("basic", "banana", "potato") | ForEach-Object {
|
2023-08-23 16:43:00 +01:00
|
|
|
Compress-Archive -Path $(Join-Path -Path $target -ChildPath $_) -DestinationPath $(Join-Path -Path $target -ChildPath "${_}.zip") -Force
|
2025-01-20 16:33:12 +00:00
|
|
|
}
|
2023-08-23 16:39:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function Get-Builds {
|
|
|
|
@("basic", "banana", "potato") | ForEach-Object {
|
2025-01-20 16:33:12 +00:00
|
|
|
$specName = $_
|
|
|
|
|
|
|
|
Write-Host "building $specName"
|
|
|
|
|
|
|
|
pdm run pyinstaller --noconfirm --distpath (Join-Path -Path "dist" -ChildPath $specName) (Join-Path -Path "spec" -ChildPath "${specName}.spec")
|
|
|
|
}
|
2023-08-23 16:39:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function main {
|
|
|
|
Get-Builds
|
|
|
|
Compress-Builds
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($MyInvocation.InvocationName -ne '.') { main }
|