mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2025-02-22 01:55:05 +00:00
call task from poe
remove build.ps1 and scripts.py
This commit is contained in:
parent
1d8ffdc756
commit
293bccc5ba
@ -63,7 +63,7 @@ tasks:
|
|||||||
- for:
|
- for:
|
||||||
matrix:
|
matrix:
|
||||||
KIND: [basic, banana, potato]
|
KIND: [basic, banana, potato]
|
||||||
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/sunvalley-{{.ITEM.KIND}} -DestinationPath dist/sunvalley-{{.ITEM.KIND}}.zip"'
|
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/sunvalley-{{.ITEM.KIND}} -DestinationPath dist/sunvalley-{{.ITEM.KIND}}.zip -Force"'
|
||||||
|
|
||||||
compress-forest:
|
compress-forest:
|
||||||
cmds:
|
cmds:
|
||||||
@ -71,7 +71,7 @@ tasks:
|
|||||||
matrix:
|
matrix:
|
||||||
KIND: [basic, banana, potato]
|
KIND: [basic, banana, potato]
|
||||||
THEME: [light, dark]
|
THEME: [light, dark]
|
||||||
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/forest-{{.ITEM.KIND}}-{{.ITEM.THEME}} -DestinationPath dist/forest-{{.ITEM.KIND}}-{{.ITEM.THEME}}.zip"'
|
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/forest-{{.ITEM.KIND}}-{{.ITEM.THEME}} -DestinationPath dist/forest-{{.ITEM.KIND}}-{{.ITEM.THEME}}.zip -Force"'
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
desc: Clean up build and dist directories
|
desc: Clean up build and dist directories
|
||||||
|
41
build.ps1
41
build.ps1
@ -1,41 +0,0 @@
|
|||||||
param(
|
|
||||||
[Parameter(Mandatory = $true)]
|
|
||||||
[string]$prefix,
|
|
||||||
[string]$theme
|
|
||||||
)
|
|
||||||
|
|
||||||
function Format-SpecName {
|
|
||||||
param(
|
|
||||||
[string]$Kind
|
|
||||||
)
|
|
||||||
return @(
|
|
||||||
$prefix,
|
|
||||||
$Kind,
|
|
||||||
(& { if ($theme) { $theme } else { "" } })
|
|
||||||
).Where({ $_ -ne "" }) -Join "-"
|
|
||||||
}
|
|
||||||
|
|
||||||
function Compress-Builds {
|
|
||||||
$target = Join-Path -Path $PSScriptRoot -ChildPath "dist"
|
|
||||||
@("basic", "banana", "potato") | ForEach-Object {
|
|
||||||
$compressPath = Format-SpecName -Kind $_
|
|
||||||
Compress-Archive -Path (Join-Path -Path $target -ChildPath $compressPath) -DestinationPath (Join-Path -Path $target -ChildPath "${compressPath}.zip") -Force
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Get-Builds {
|
|
||||||
@("basic", "banana", "potato") | ForEach-Object {
|
|
||||||
$specName = Format-SpecName -Kind $_
|
|
||||||
|
|
||||||
Write-Host "building $specName"
|
|
||||||
|
|
||||||
poetry 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 }
|
|
@ -38,9 +38,14 @@ requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.poe.tasks]
|
[tool.poe.tasks]
|
||||||
build_sunvalley.script = "scripts:build_sunvalley"
|
build-sunvalley = "task build-sunvalley"
|
||||||
build_forest.script = "scripts:build_forest"
|
build-forest = "task build-forest"
|
||||||
build_all.script = "scripts:build_all"
|
release = [
|
||||||
|
{ ref = "build-sunvalley" },
|
||||||
|
{ ref = "build-forest" },
|
||||||
|
{ cmd = "task compress-sunvalley" },
|
||||||
|
{ cmd = "task compress-forest" },
|
||||||
|
]
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
exclude = [
|
exclude = [
|
||||||
|
24
scripts.py
24
scripts.py
@ -1,24 +0,0 @@
|
|||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
|
|
||||||
def build_sunvalley():
|
|
||||||
buildscript = Path.cwd() / 'build.ps1'
|
|
||||||
subprocess.run(['powershell', str(buildscript), 'sunvalley'])
|
|
||||||
|
|
||||||
|
|
||||||
def build_forest():
|
|
||||||
rewriter = Path.cwd() / 'tools' / 'rewriter.py'
|
|
||||||
subprocess.run([sys.executable, str(rewriter), '--rewrite'])
|
|
||||||
|
|
||||||
buildscript = Path.cwd() / 'build.ps1'
|
|
||||||
for theme in ('light', 'dark'):
|
|
||||||
subprocess.run(['powershell', str(buildscript), 'forest', theme])
|
|
||||||
|
|
||||||
subprocess.run([sys.executable, str(rewriter), '--restore'])
|
|
||||||
|
|
||||||
|
|
||||||
def build_all():
|
|
||||||
steps = (build_sunvalley, build_forest)
|
|
||||||
[step() for step in steps]
|
|
Loading…
Reference in New Issue
Block a user