From 4beeece5127a149efbd29394f09d68b04da4f9e8 Mon Sep 17 00:00:00 2001 From: Yao Chung Hu <30311066+FlashyReese@users.noreply.github.com> Date: Mon, 5 Jun 2023 02:36:10 +0800 Subject: [PATCH] Global DFL Part 2 (#25) --- .vscode/defsettings.json | 1 + .vscode/tasks.json | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.vscode/defsettings.json b/.vscode/defsettings.json index 8effecb..2f1e569 100644 --- a/.vscode/defsettings.json +++ b/.vscode/defsettings.json @@ -1,6 +1,7 @@ { "deckip" : "0.0.0.0", "deckport" : "22", + "deckuser" : "deck", "deckpass" : "ssap", "deckkey" : "-i ${env:HOME}/.ssh/id_rsa", "deckdir" : "/home/deck", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 22cd5c2..8f96761 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -34,7 +34,7 @@ "dependsOn": [ "depsetup", "pnpmsetup", - "updatedfrontendlib" + "updatefrontendlib" ], "problemMatcher": [] }, @@ -90,7 +90,7 @@ "dependsOn": [ "chmodplugins" ], - "command": "rsync -azp --chmod=D0755,F0755 --rsh='ssh -p ${config:deckport} ${config:deckkey}' out/ deck@${config:deckip}:${config:deckdir}/homebrew/plugins", + "command": "rsync -azp --chmod=D0755,F0755 --rsh='ssh -p ${config:deckport} ${config:deckkey}' out/ ${config:deckuser}@${config:deckip}:${config:deckdir}/homebrew/plugins", "problemMatcher": [] }, // @@ -99,7 +99,7 @@ "detail": "", "type": "shell", "group": "none", - "command": "echo '${config:deckdir}/homebrew/plugins/${config:pluginname}.zip' && ssh deck@${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 deck:deck \"$(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| |-|\")\" --strip-components=1 --fflags '", + "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| |-|\")\" --strip-components=1 --fflags '", "problemMatcher": [] }, //"All-in-one" deploy task @@ -113,6 +113,18 @@ ], "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 { @@ -129,7 +141,7 @@ "detail": "chmods plugins folder to prevent perms issues", "type": "shell", "group": "none", - "command": "ssh deck@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo '${config:deckpass}' | sudo -S chmod -R ug+rw ${config:deckdir}/homebrew/plugins/'", + "command": "ssh ${config:deckuser}@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo '${config:deckpass}' | sudo -S chmod -R ug+rw ${config:deckdir}/homebrew/plugins/'", "problemMatcher": [] }, ]