moved to deckbuild

This commit is contained in:
Witherking25 2023-02-17 20:31:32 +00:00
commit 54ba277a12
18 changed files with 590 additions and 107 deletions

12
.vscode/config.sh vendored
View file

@ -1,12 +0,0 @@
#!/usr/bin/env bash
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
# printf "${SCRIPT_DIR}\n"
# printf "$(dirname $0)\n"
if ! [[ -e "${SCRIPT_DIR}/settings.json" ]]; then
printf '.vscode/settings.json does not exist. Creating it with default settings. Exiting afterwards. Run your task again.\n\n'
cp "${SCRIPT_DIR}/defsettings.json" "${SCRIPT_DIR}/settings.json"
exit 1
else
printf '.vscode/settings.json does exist. Congrats.\n'
printf 'Make sure to change settings.json to match your deck.\n'
fi

View file

@ -1,10 +0,0 @@
{
"deckip" : "0.0.0.0",
"deckport" : "22",
"deckpass" : "ssap",
"deckkey" : "-i ${env:HOME}/.ssh/id_rsa",
"deckdir" : "/home/deck",
"python.analysis.extraPaths": [
"./py_modules"
]
}

83
.vscode/tasks.json vendored
View file

@ -1,16 +1,6 @@
{
"version": "2.0.0",
"tasks": [
// OTHER
{
"label": "checkforsettings",
"type": "shell",
"group": "none",
"detail": "Check that settings.json has been created",
"command": "bash -c ${workspaceFolder}/.vscode/config.sh",
"problemMatcher": []
},
// BUILD
{
"label": "pnpmsetup",
"type": "shell",
@ -27,6 +17,7 @@
"command": "pnpm update decky-frontend-lib --latest",
"problemMatcher": []
},
// BUILD
{
"label": "build",
"type": "npm",
@ -34,71 +25,69 @@
"detail": "rollup -c",
"script": "build",
"path": "",
"problemMatcher": []
},
{
"label": "buildall",
"group": "build",
"detail": "Build decky-plugin-template",
"dependsOrder": "sequence",
"dependsOn": [
"pnpmsetup",
"build"
"pnpmsetup"
],
"problemMatcher": []
},
{
"label": "build-dev",
"type": "npm",
"group": "build",
"detail": "rollup -c",
"script": "dev",
"path": "",
"dependsOrder": "sequence",
"dependsOn": [
"pnpmsetup"
],
"problemMatcher": []
},
// DEPLOY
{
"label": "createfolders",
"detail": "Create plugins folder in expected directory",
"label": "deploy",
"detail": "Deploy plugin to deck",
"type": "shell",
"group": "none",
"dependsOn": [
"checkforsettings"
"pnpmsetup"
],
"command": "ssh deck@${config:deckip} -p ${config:deckport} ${config:deckkey} 'mkdir -p ${config:deckdir}/homebrew/pluginloader && mkdir -p ${config:deckdir}/homebrew/plugins'",
"command": "pnpm start -r",
"problemMatcher": []
},
{
"label": "deploy",
{
"label": "deploy-dev",
"detail": "Deploy dev plugin to deck",
"type": "shell",
"group": "none",
"dependsOn": [
"createfolders",
"chmodfolders"
"pnpmsetup"
],
"command": "rsync -azp --delete --chmod=D0755,F0755 --rsh='ssh -p ${config:deckport} ${config:deckkey}' --exclude='.git/' --exclude='.github/' --exclude='.vscode/' --exclude='node_modules/' --exclude='src/' --exclude='*.log' --exclude='.gitignore' . deck@${config:deckip}:${config:deckdir}/homebrew/plugins/${workspaceFolderBasename}",
"command": "pnpm start -r -d",
"problemMatcher": []
},
// PACKAGE
{
"label": "chmodfolders",
"detail": "chmods folders to prevent perms issues",
"label": "package",
"detail": "Package plugin to zip",
"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/'",
"dependsOn": [
"pnpmsetup"
],
"command": "pnpm package",
"problemMatcher": []
},
{
"label": "deployall",
"dependsOrder": "sequence",
{
"label": "package-dev",
"detail": "Package dev plugin to zip",
"type": "shell",
"group": "none",
"dependsOn": [
"deploy",
"chmodfolders"
],
"problemMatcher": []
},
// ALL-IN-ONE
{
"label": "allinone",
"detail": "Build and deploy",
"dependsOrder": "sequence",
"group": "test",
"dependsOn": [
"buildall",
"deployall"
"pnpmsetup"
],
"command": "pnpm package -d",
"problemMatcher": []
}
]