mirror of
https://github.com/onyx-and-iris/nvda-addon-voicemeeter.git
synced 2025-02-22 21:05:07 +00:00
add Taskfile
invoke tasks from pdm
This commit is contained in:
parent
43379f1b09
commit
17cdd84c51
21
Taskfile.yml
Normal file
21
Taskfile.yml
Normal file
@ -0,0 +1,21 @@
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
SHELL: pwsh
|
||||
SOURCE: addon\globalPlugins\voicemeeter
|
||||
DEST: ${env:appdata}\nvda\scratchpad\globalPlugins\voicemeeter\
|
||||
IGNORE: ${env:appdata}\nvda\scratchpad\globalPlugins\voicemeeter\__pycache__\
|
||||
|
||||
tasks:
|
||||
copy:
|
||||
desc: Copy sources files to scratchpad directory
|
||||
platforms: [windows]
|
||||
cmds:
|
||||
- "{{.SHELL}} -Command 'robocopy {{.SOURCE}} {{.DEST}} /NDL'"
|
||||
ignore_error: true
|
||||
|
||||
build:
|
||||
desc: Build the addon
|
||||
platforms: [windows]
|
||||
cmds:
|
||||
- '{{.SHELL}} -Command "scons"'
|
25
build.ps1
25
build.ps1
@ -1,25 +0,0 @@
|
||||
param (
|
||||
[switch]$build
|
||||
)
|
||||
|
||||
function Copy-FilesToScratchpad {
|
||||
$source = Join-Path $PSScriptRoot "addon" "globalPlugins" "voicemeeter"
|
||||
$target = Join-Path $env:appdata "nvda" "scratchpad" "globalPlugins" "voicemeeter"
|
||||
Robocopy $source $target | Out-Null
|
||||
}
|
||||
|
||||
function Build-Addon {
|
||||
"Building add-on" | Write-Host
|
||||
scons
|
||||
}
|
||||
|
||||
function Main {
|
||||
"Copying updated files to Scratchpad" | Write-Host
|
||||
Copy-FilesToScratchpad
|
||||
|
||||
if ($build) {
|
||||
Build-Addon
|
||||
}
|
||||
}
|
||||
|
||||
if ($MyInvocation.InvocationName -ne '.') { Main }
|
@ -20,8 +20,8 @@ build = [
|
||||
distribution = false
|
||||
|
||||
[tool.pdm.scripts]
|
||||
copy = "pwsh build.ps1"
|
||||
build = "pwsh build.ps1 -build"
|
||||
copy = "task copy"
|
||||
build = "task build"
|
||||
|
||||
[tool.ruff]
|
||||
exclude = [
|
||||
|
Loading…
Reference in New Issue
Block a user