mirror of
https://github.com/SteamDeckHomebrew/decky-plugin-template.git
synced 2025-12-10 23:58:07 -06:00
Migrate bash scripts to package scripts. Update VSCode tasks to use package scripts. Use ssh key instead of password.
This commit is contained in:
parent
8262602460
commit
14dfd8e8c2
9 changed files with 78 additions and 221 deletions
129
.vscode/tasks.json
vendored
129
.vscode/tasks.json
vendored
|
|
@ -1,141 +1,32 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
//PRELIMINARY SETUP TASKS
|
||||
//Dependency setup task
|
||||
{
|
||||
"label": "depsetup",
|
||||
"type": "shell",
|
||||
"group": "none",
|
||||
"detail": "Install depedencies for basic setup",
|
||||
"command": "${workspaceFolder}/.vscode/setup.sh",
|
||||
// // placeholder for windows scripts, not currently planned
|
||||
// "windows": {
|
||||
// "command": "call -c ${workspaceFolder}\\.vscode\\setup.bat",
|
||||
// },
|
||||
"problemMatcher": []
|
||||
},
|
||||
//pnpm setup task to grab all needed modules
|
||||
{
|
||||
"label": "pnpmsetup",
|
||||
"type": "shell",
|
||||
"group": "none",
|
||||
"detail": "Setup pnpm",
|
||||
"command": "which pnpm && pnpm i",
|
||||
"problemMatcher": []
|
||||
},
|
||||
//Preliminary "All-in-one" setup task
|
||||
{
|
||||
"label": "setup",
|
||||
"detail": "Set up depedencies, pnpm and update Decky Frontend Library.",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"depsetup",
|
||||
"pnpmsetup",
|
||||
"updatefrontendlib"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
//Preliminary Deploy Config Setup
|
||||
{
|
||||
"label": "settingscheck",
|
||||
"detail": "Setup dependencies",
|
||||
"type": "shell",
|
||||
"group": "none",
|
||||
"detail": "Check that settings.json has been created",
|
||||
"command": "${workspaceFolder}/.vscode/config.sh",
|
||||
// // placeholder for windows scripts, not currently planned
|
||||
// "windows": {
|
||||
// "command": "call ${workspaceFolder}\\.vscode\\config.bat",
|
||||
// },
|
||||
"command": "pnpm run setup",
|
||||
"problemMatcher": []
|
||||
},
|
||||
//BUILD TASKS
|
||||
{
|
||||
"label": "cli-build",
|
||||
"group": "build",
|
||||
"detail": "Build plugin with CLI",
|
||||
"command": "${workspaceFolder}/.vscode/build.sh",
|
||||
// // placeholder for windows logic, not currently planned
|
||||
// "windows": {
|
||||
// "command": "call ${workspaceFolder}\\.vscode\\build.bat",
|
||||
// },
|
||||
"problemMatcher": []
|
||||
},
|
||||
//"All-in-one" build task
|
||||
{
|
||||
"label": "build",
|
||||
"group": "build",
|
||||
"detail": "Build decky-plugin-template",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"setup",
|
||||
"settingscheck",
|
||||
"cli-build",
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
//DEPLOY TASKS
|
||||
//Copies the zip file of the built plugin to the plugins folder
|
||||
{
|
||||
"label": "copyzip",
|
||||
"detail": "Deploy plugin zip to deck",
|
||||
"label": "build:plugin",
|
||||
"detail": "Build plugin",
|
||||
"type": "shell",
|
||||
"group": "none",
|
||||
"dependsOn": [
|
||||
"chmodplugins"
|
||||
],
|
||||
"command": "rsync -azp --chmod=D0755,F0755 --rsh='ssh -p ${config:deckport} ${config:deckkey}' out/ ${config:deckuser}@${config:deckip}:${config:deckdir}/homebrew/plugins",
|
||||
"command": "pnpm run build:plugin",
|
||||
"problemMatcher": []
|
||||
},
|
||||
//
|
||||
{
|
||||
"label": "extractzip",
|
||||
"detail": "",
|
||||
"type": "shell",
|
||||
"group": "none",
|
||||
"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 -m 755 -p \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|g\")\" && echo ${config:deckpass} | sudo -S chown ${config:deckuser}:${config:deckuser} \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|g\")\" && 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 '",
|
||||
"problemMatcher": []
|
||||
},
|
||||
//"All-in-one" deploy task
|
||||
{
|
||||
"label": "deploy",
|
||||
"dependsOrder": "sequence",
|
||||
"group": "none",
|
||||
"dependsOn": [
|
||||
"copyzip",
|
||||
"extractzip"
|
||||
],
|
||||
"detail": "Deploy plugin to deck",
|
||||
"type": "shell",
|
||||
"command": "pnpm run deploy",
|
||||
"problemMatcher": []
|
||||
},
|
||||
//"All-in-on" build & deploy task
|
||||
{
|
||||
"label": "builddeploy",
|
||||
"detail": "Builds plugin and deploys to deck",
|
||||
"dependsOrder": "sequence",
|
||||
"group": "none",
|
||||
"dependsOn": [
|
||||
"build",
|
||||
"deploy"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
//GENERAL TASKS
|
||||
//Update Decky Frontend Library, aka DFL
|
||||
{
|
||||
"label": "updatefrontendlib",
|
||||
"detail": "Build and deploy plugin to deck",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"detail": "Update @decky/ui aka DFL",
|
||||
"command": "pnpm update @decky/ui --latest",
|
||||
"problemMatcher": []
|
||||
},
|
||||
//Used chmod plugins folder to allow copy-over of files
|
||||
{
|
||||
"label": "chmodplugins",
|
||||
"detail": "chmods plugins folder to prevent perms issues",
|
||||
"type": "shell",
|
||||
"group": "none",
|
||||
"command": "ssh ${config:deckuser}@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo '${config:deckpass}' | sudo -S chmod -R ug+rw ${config:deckdir}/homebrew/plugins/'",
|
||||
"command": "pnpm run build:deploy",
|
||||
"problemMatcher": []
|
||||
},
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue