2022-06-14 21:38:29 +01:00
|
|
|
{
|
|
|
|
"version": "2.0.0",
|
|
|
|
"tasks": [
|
2023-06-03 15:42:27 +01:00
|
|
|
//PRELIMINARY SETUP TASKS
|
|
|
|
//Dependency setup task
|
2022-06-14 23:01:10 +01:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "depsetup",
|
2022-06-14 23:01:10 +01:00
|
|
|
"type": "shell",
|
|
|
|
"group": "none",
|
2023-06-03 15:42:27 +01:00
|
|
|
"detail": "Install depedencies for basic setup",
|
|
|
|
"linux": {
|
|
|
|
"command": "${workspaceFolder}/.vscode/setup.sh",
|
|
|
|
},
|
|
|
|
// // placeholder for windows scripts, not currently planned
|
|
|
|
// "windows": {
|
|
|
|
// "command": "call -c ${workspaceFolder}\\.vscode\\setup.bat",
|
|
|
|
// },
|
2022-06-14 23:01:10 +01:00
|
|
|
"problemMatcher": []
|
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//pnpm setup task to grab all needed modules
|
2022-06-14 21:38:29 +01:00
|
|
|
{
|
|
|
|
"label": "pnpmsetup",
|
|
|
|
"type": "shell",
|
2023-06-03 15:42:27 +01:00
|
|
|
"group": "none",
|
2022-06-14 21:38:29 +01:00
|
|
|
"detail": "Setup pnpm",
|
2023-06-03 15:42:27 +01:00
|
|
|
"command": "which pnpm && pnpm i",
|
2022-06-14 21:38:29 +01:00
|
|
|
"problemMatcher": []
|
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//Preliminary "All-in-one" setup task
|
2022-06-14 21:38:29 +01:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "setup",
|
|
|
|
"detail": "Set up depedencies, pnpm and update Decky Frontend Library.",
|
|
|
|
"dependsOrder": "sequence",
|
|
|
|
"dependsOn": [
|
|
|
|
"depsetup",
|
|
|
|
"pnpmsetup",
|
2023-06-04 19:36:10 +01:00
|
|
|
"updatefrontendlib"
|
2023-06-03 15:42:27 +01:00
|
|
|
],
|
|
|
|
"problemMatcher": []
|
|
|
|
},
|
|
|
|
//Preliminary Deploy Config Setup
|
|
|
|
{
|
|
|
|
"label": "settingscheck",
|
2022-06-14 21:38:29 +01:00
|
|
|
"type": "shell",
|
2023-06-03 15:42:27 +01:00
|
|
|
"group": "none",
|
|
|
|
"detail": "Check that settings.json has been created",
|
|
|
|
"linux": {
|
|
|
|
"command": "${workspaceFolder}/.vscode/config.sh",
|
|
|
|
},
|
|
|
|
// // placeholder for windows scripts, not currently planned
|
|
|
|
// "windows": {
|
|
|
|
// "command": "call ${workspaceFolder}\\.vscode\\config.bat",
|
|
|
|
// },
|
2022-06-14 21:38:29 +01:00
|
|
|
"problemMatcher": []
|
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//BUILD TASKS
|
2022-06-14 21:38:29 +01:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "cli-build",
|
2022-06-14 21:38:29 +01:00
|
|
|
"group": "build",
|
2023-06-03 15:42:27 +01:00
|
|
|
"detail": "Build plugin with CLI",
|
|
|
|
"linux": {
|
|
|
|
"command": "${workspaceFolder}/.vscode/build.sh",
|
|
|
|
},
|
|
|
|
// // placeholder for windows logic, not currently planned
|
|
|
|
// "windows": {
|
|
|
|
// "command": "call ${workspaceFolder}\\.vscode\\build.bat",
|
|
|
|
// },
|
2022-06-16 22:59:43 +01:00
|
|
|
"problemMatcher": []
|
2022-06-14 21:38:29 +01:00
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//"All-in-one" build task
|
2022-06-14 21:38:29 +01:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "build",
|
2022-06-14 21:38:29 +01:00
|
|
|
"group": "build",
|
|
|
|
"detail": "Build decky-plugin-template",
|
|
|
|
"dependsOrder": "sequence",
|
|
|
|
"dependsOn": [
|
2023-06-03 15:42:27 +01:00
|
|
|
"setup",
|
|
|
|
"settingscheck",
|
|
|
|
"cli-build",
|
2022-06-16 22:59:43 +01:00
|
|
|
],
|
|
|
|
"problemMatcher": []
|
2022-06-16 20:15:06 +01:00
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//DEPLOY TASKS
|
|
|
|
//Copies the zip file of the built plugin to the plugins folder
|
2022-06-16 20:15:06 +01:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "copyzip",
|
|
|
|
"detail": "Deploy plugin zip to deck",
|
2022-06-16 20:15:06 +01:00
|
|
|
"type": "shell",
|
|
|
|
"group": "none",
|
|
|
|
"dependsOn": [
|
2023-06-03 15:42:27 +01:00
|
|
|
"chmodplugins"
|
2022-06-16 20:15:06 +01:00
|
|
|
],
|
2023-06-04 19:36:10 +01:00
|
|
|
"command": "rsync -azp --chmod=D0755,F0755 --rsh='ssh -p ${config:deckport} ${config:deckkey}' out/ ${config:deckuser}@${config:deckip}:${config:deckdir}/homebrew/plugins",
|
2022-06-16 20:15:06 +01:00
|
|
|
"problemMatcher": []
|
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//
|
2022-06-16 20:15:06 +01:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "extractzip",
|
|
|
|
"detail": "",
|
2022-06-16 20:15:06 +01:00
|
|
|
"type": "shell",
|
|
|
|
"group": "none",
|
2023-08-04 01:27:35 +01:00
|
|
|
"command": "echo '${config:deckdir}/homebrew/plugins/${config:pluginname}.zip' && ssh ${config:deckuser}@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo ${config:deckpass} | sudo -S mkdir 755 -p \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|\")\" && echo ${config:deckpass} | sudo -S chown ${config:deckuser}:${config:deckuser} \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|\")\" && echo ${config:deckpass} | sudo -S bsdtar -xzpf \"${config:deckdir}/homebrew/plugins/${config:pluginname}.zip\" -C \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|g\")\" --strip-components=1 --fflags '",
|
2022-06-16 20:47:53 +01:00
|
|
|
"problemMatcher": []
|
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//"All-in-one" deploy task
|
2023-02-20 18:34:55 +00:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "deploy",
|
|
|
|
"dependsOrder": "sequence",
|
2023-02-20 18:34:55 +00:00
|
|
|
"group": "none",
|
2023-06-03 15:42:27 +01:00
|
|
|
"dependsOn": [
|
|
|
|
"copyzip",
|
|
|
|
"extractzip"
|
|
|
|
],
|
2023-02-20 18:34:55 +00:00
|
|
|
"problemMatcher": []
|
|
|
|
},
|
2023-06-04 19:36:10 +01:00
|
|
|
//"All-in-on" build & deploy task
|
|
|
|
{
|
|
|
|
"label": "builddeploy",
|
|
|
|
"detail": "Builds plugin and deploys to deck",
|
|
|
|
"dependsOrder": "sequence",
|
|
|
|
"group": "none",
|
|
|
|
"dependsOn": [
|
|
|
|
"build",
|
|
|
|
"deploy"
|
|
|
|
],
|
|
|
|
"problemMatcher": []
|
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//GENERAL TASKS
|
|
|
|
//Update Decky Frontend Library, aka DFL
|
2022-06-16 20:47:53 +01:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "updatefrontendlib",
|
2022-06-16 20:47:53 +01:00
|
|
|
"type": "shell",
|
2023-06-03 15:42:27 +01:00
|
|
|
"group": "build",
|
2024-06-13 23:11:44 +01:00
|
|
|
"detail": "Update @decky/ui aka DFL",
|
|
|
|
"command": "pnpm update @decky/ui --latest",
|
2022-06-16 20:15:06 +01:00
|
|
|
"problemMatcher": []
|
|
|
|
},
|
2023-06-03 15:42:27 +01:00
|
|
|
//Used chmod plugins folder to allow copy-over of files
|
2022-06-16 20:15:06 +01:00
|
|
|
{
|
2023-06-03 15:42:27 +01:00
|
|
|
"label": "chmodplugins",
|
|
|
|
"detail": "chmods plugins folder to prevent perms issues",
|
|
|
|
"type": "shell",
|
2022-06-16 20:15:06 +01:00
|
|
|
"group": "none",
|
2023-06-04 19:36:10 +01:00
|
|
|
"command": "ssh ${config:deckuser}@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo '${config:deckpass}' | sudo -S chmod -R ug+rw ${config:deckdir}/homebrew/plugins/'",
|
2022-06-16 22:59:43 +01:00
|
|
|
"problemMatcher": []
|
2022-06-16 20:15:06 +01:00
|
|
|
},
|
2022-06-14 21:38:29 +01:00
|
|
|
]
|
|
|
|
}
|