2025-02-07 14:53:21 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
vars:
|
|
|
|
SHELL: pwsh
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
default:
|
2025-02-07 22:58:30 +00:00
|
|
|
desc: Prepare artifacts for release
|
|
|
|
cmds:
|
|
|
|
- task: release
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
release:
|
2025-02-07 22:58:30 +00:00
|
|
|
desc: Build and compress all artifacts
|
2025-02-07 14:53:21 +00:00
|
|
|
cmds:
|
2025-02-07 22:58:30 +00:00
|
|
|
- task: build
|
|
|
|
- task: compress
|
|
|
|
- echo "Release complete"
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
build:
|
2025-02-07 22:58:30 +00:00
|
|
|
desc: Build all artifacts
|
2025-02-07 14:53:21 +00:00
|
|
|
cmds:
|
2025-02-07 22:58:30 +00:00
|
|
|
- task: build-sunvalley
|
|
|
|
- echo "Sunvalley build complete"
|
|
|
|
- task: build-forest
|
|
|
|
- echo "Forest build complete"
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
build-sunvalley:
|
2025-02-07 22:58:30 +00:00
|
|
|
desc: Build Sunvalley artifacts
|
2025-02-07 14:53:21 +00:00
|
|
|
cmds:
|
2025-02-07 22:58:30 +00:00
|
|
|
- for:
|
|
|
|
matrix:
|
|
|
|
KIND: [basic, banana, potato]
|
|
|
|
cmd: poetry run pyinstaller --noconfirm --distpath dist/sunvalley-{{.ITEM.KIND}} spec/sunvalley-{{.ITEM.KIND}}.spec
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
build-forest:
|
2025-02-07 22:58:30 +00:00
|
|
|
desc: Build Forest artifacts
|
2025-02-07 14:53:21 +00:00
|
|
|
deps: [rewrite]
|
|
|
|
cmds:
|
2025-02-07 22:58:30 +00:00
|
|
|
- defer: { task: restore }
|
|
|
|
- for:
|
|
|
|
matrix:
|
|
|
|
KIND: [basic, banana, potato]
|
|
|
|
THEME: [light, dark]
|
|
|
|
cmd: poetry run pyinstaller --noconfirm --distpath dist/forest-{{.ITEM.KIND}}-{{.ITEM.THEME}} spec/forest-{{.ITEM.KIND}}-{{.ITEM.THEME}}.spec
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
rewrite:
|
2025-02-12 18:26:43 +00:00
|
|
|
internal: true
|
2025-02-07 22:58:30 +00:00
|
|
|
desc: Run the source code rewriter
|
|
|
|
cmds:
|
|
|
|
- poetry run python tools/rewriter.py --rewrite
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
restore:
|
2025-02-12 18:26:43 +00:00
|
|
|
internal: true
|
2025-02-07 22:58:30 +00:00
|
|
|
desc: Restore the backup files
|
2025-02-07 14:53:21 +00:00
|
|
|
cmds:
|
2025-02-07 22:58:30 +00:00
|
|
|
- poetry run python tools/rewriter.py --restore
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
compress:
|
|
|
|
deps: [compress-sunvalley, compress-forest]
|
|
|
|
|
|
|
|
compress-sunvalley:
|
|
|
|
cmds:
|
2025-02-07 22:58:30 +00:00
|
|
|
- for:
|
|
|
|
matrix:
|
|
|
|
KIND: [basic, banana, potato]
|
2025-02-13 16:23:35 +00:00
|
|
|
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/sunvalley-{{.ITEM.KIND}} -DestinationPath dist/sunvalley-{{.ITEM.KIND}}.zip -Force"'
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
compress-forest:
|
|
|
|
cmds:
|
2025-02-07 22:58:30 +00:00
|
|
|
- for:
|
|
|
|
matrix:
|
|
|
|
KIND: [basic, banana, potato]
|
|
|
|
THEME: [light, dark]
|
2025-02-13 16:23:35 +00:00
|
|
|
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/forest-{{.ITEM.KIND}}-{{.ITEM.THEME}} -DestinationPath dist/forest-{{.ITEM.KIND}}-{{.ITEM.THEME}}.zip -Force"'
|
2025-02-07 14:53:21 +00:00
|
|
|
|
|
|
|
clean:
|
2025-02-12 18:26:43 +00:00
|
|
|
desc: Clean up build and dist directories
|
2025-02-07 14:53:21 +00:00
|
|
|
cmds:
|
|
|
|
- |
|
|
|
|
{{.SHELL}} -Command "
|
2025-02-07 16:37:00 +00:00
|
|
|
Remove-Item -Path build/forest-*,build/sunvalley-*,dist/forest-*,dist/sunvalley-* -Recurse -Force"
|