From 3f696d86da71283d35b38a99b58047a4ce779392 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 23 Aug 2023 16:39:50 +0100 Subject: [PATCH] build and compress --- build.ps1 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/build.ps1 b/build.ps1 index 25a4f82..572bc4f 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,3 +1,20 @@ -@("basic", "banana", "potato") | ForEach-Object { - pdm run pyinstaller "${_}.spec" --noconfirm -} \ No newline at end of file +function Compress-Builds { + @("basic", "banana", "potato") | ForEach-Object { + $target = Join-Path -Path $PSScriptRoot -ChildPath "dist" + Compress-Archive -Path $(Join-Path -Path $target -ChildPath $_) -DestinationPath $(Join-Path -Path $target -ChildPath "${_}.zip") + } +} + +function Get-Builds { + @("basic", "banana", "potato") | ForEach-Object { + pdm run pyinstaller "${_}.spec" --noconfirm + } +} + +function main { + Get-Builds + + Compress-Builds +} + +if ($MyInvocation.InvocationName -ne '.') { main } \ No newline at end of file