From 2706338fcb0c492528547b77e0ffdb81c6ffad02 Mon Sep 17 00:00:00 2001 From: Onyx and Iris Date: Fri, 7 Feb 2025 16:07:45 +0000 Subject: [PATCH] add Taskfile --- Taskfile.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Taskfile.yml diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..8d7d2e7 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,40 @@ +version: '3' + +vars: + SHELL: pwsh + +tasks: + default: + desc: Prepare artifacts for release + cmds: + - task: release + + release: + desc: Build and compress all artifacts + cmds: + - task: build + - task: compress + + build: + desc: Build the project + cmds: + - for: + matrix: + KIND: ["basic", "banana", "potato"] + cmd: pdm run pyinstaller --noconfirm --distpath dist/{{.ITEM.KIND}} spec/{{.ITEM.KIND}}.spec + + compress: + desc: Compress the build artifacts + cmds: + - for: + matrix: + KIND: ["basic", "banana", "potato"] + cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/{{.ITEM.KIND}} -DestinationPath dist/{{.ITEM.KIND}}.zip"' + + clean: + desc: Clean the project + cmds: + - | + {{.SHELL}} -Command " + Remove-Item -Recurse -Force build/basic,build/banana,build/potato + Remove-Item -Recurse -Force dist/*" \ No newline at end of file