add compress tasks to Taskfile.dynamic

This commit is contained in:
onyx-and-iris 2026-03-10 02:18:26 +00:00
parent 16ac188eb4
commit 6d5bd673a4
2 changed files with 36 additions and 2 deletions

View File

@ -13,13 +13,11 @@ tasks:
cmd: poetry run pyinstaller --noconfirm --distpath dist/{{.ITEM.THEME}}-{{.ITEM.KIND}} spec/azure/{{.ITEM.THEME}}-{{.ITEM.KIND}}.spec cmd: poetry run pyinstaller --noconfirm --distpath dist/{{.ITEM.THEME}}-{{.ITEM.KIND}} spec/azure/{{.ITEM.THEME}}-{{.ITEM.KIND}}.spec
rewrite: rewrite:
#internal: true
desc: Run the source code rewriter desc: Run the source code rewriter
cmds: cmds:
- poetry run python tools/rewriter.py --rewrite --theme {{.THEME}} - poetry run python tools/rewriter.py --rewrite --theme {{.THEME}}
restore: restore:
#internal: true
desc: Restore the backup files desc: Restore the backup files
cmds: cmds:
- poetry run python tools/rewriter.py --restore - poetry run python tools/rewriter.py --restore

View File

@ -33,6 +33,42 @@ tasks:
cmds: cmds:
- poetry run python tools/dynamic_builder.py sunvalley - poetry run python tools/dynamic_builder.py sunvalley
compress:
desc: Compress artifacts for specified theme
cmds:
- task: compress-{{.THEME}}
compress-all:
desc: Compress artifacts for all themes
cmds:
- for:
matrix:
THEME: [azure, forest, sunvalley]
task: compress-{{.ITEM.THEME}}
compress-azure:
cmds:
- for:
matrix:
KIND: [basic, banana, potato]
VARIANT: [azure-light, azure-dark]
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/{{.ITEM.VARIANT}}-{{.ITEM.KIND}} -DestinationPath dist/{{.ITEM.VARIANT}}-{{.ITEM.KIND}}.zip -Force"'
compress-forest:
cmds:
- for:
matrix:
KIND: [basic, banana, potato]
VARIANT: [forest-light, forest-dark]
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/{{.ITEM.VARIANT}}-{{.ITEM.KIND}} -DestinationPath dist/{{.ITEM.VARIANT}}-{{.ITEM.KIND}}.zip -Force"'
compress-sunvalley:
cmds:
- for:
matrix:
KIND: [basic, banana, potato]
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/sunvalley-{{.ITEM.KIND}} -DestinationPath dist/sunvalley-{{.ITEM.KIND}}.zip -Force"'
clean: clean:
desc: Clean all build artifacts desc: Clean all build artifacts
cmds: cmds: