diff --git a/Taskfile.yml b/Taskfile.yml index 08b0a70..8fff95f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -29,7 +29,7 @@ tasks: - for: matrix: KIND: [basic, banana, potato] - cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/{{.ITEM.KIND}} -DestinationPath dist/{{.ITEM.KIND}}.zip"' + cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/{{.ITEM.KIND}} -DestinationPath dist/{{.ITEM.KIND}}.zip -Force"' clean: desc: Clean the project diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 2f8fa18..0000000 --- a/build.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -function Compress-Builds { - $target = Join-Path -Path $PSScriptRoot -ChildPath "dist" - @("basic", "banana", "potato") | ForEach-Object { - Compress-Archive -Path $(Join-Path -Path $target -ChildPath $_) -DestinationPath $(Join-Path -Path $target -ChildPath "${_}.zip") -Force - } -} - -function Get-Builds { - @("basic", "banana", "potato") | ForEach-Object { - $specName = $_ - - Write-Host "building $specName" - - pdm run pyinstaller --noconfirm --distpath (Join-Path -Path "dist" -ChildPath $specName) (Join-Path -Path "spec" -ChildPath "${specName}.spec") - } -} - -function main { - Get-Builds - Compress-Builds -} - -if ($MyInvocation.InvocationName -ne '.') { main } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 47c4ee0..e933545 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,9 @@ build-backend = "pdm.backend" distribution = true [tool.pdm.scripts] -build = {shell = "pwsh build.ps1"} +build = {shell = "task build"} +compress = {shell = "task compress"} +release = {composite = ["build", "compress"]} [tool.ruff] exclude = [