Skip to content

Commit

Permalink
Added tasks to auto build release zip
Browse files Browse the repository at this point in the history
  • Loading branch information
jurassicplayer committed Nov 6, 2022
1 parent 631e1fc commit 0f54f98
Showing 1 changed file with 99 additions and 8 deletions.
107 changes: 99 additions & 8 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,6 @@
"command": "ssh deck@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo '${config:deckpass}' | sudo -S chmod -R ug+rw ${config:deckdir}/homebrew/'",
"problemMatcher": []
},
{
"label": "restartdecky",
"detail": "restart decky plugin_loader service",
"type": "shell",
"group": "none",
"command": "ssh deck@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo '${config:deckpass}' | sudo -S systemctl restart plugin_loader'",
"problemMatcher": []
},
{
"label": "deployall",
"dependsOrder": "sequence",
Expand All @@ -97,6 +89,14 @@
],
"problemMatcher": []
},
{
"label": "restartdecky",
"detail": "restart decky plugin_loader service",
"type": "shell",
"group": "none",
"command": "ssh deck@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo '${config:deckpass}' | sudo -S systemctl restart plugin_loader'",
"problemMatcher": []
},
// ALL-IN-ONE
{
"label": "allinone",
Expand All @@ -109,6 +109,97 @@
"restartdecky"
],
"problemMatcher": []
},
// Publish: Add required files to zip
{
"label": "Publish:Clean",
"detail": "Delete previous zip",
"type": "shell",
"group": "none",
"command": "find ${workspaceFolder}/dist -maxdepth 1 -type f -iname '${workspaceFolderBasename}*.zip' -delete",
"problemMatcher": []
},
{
"label": "Publish:Required",
"detail": "Add dist folder, package.json, and plugin.json",
"type": "shell",
"group": "none",
"options": {
"cwd": "../"
},
"command": "zip -r ${workspaceFolder}/dist/${workspaceFolderBasename}.zip ${workspaceFolderBasename}/dist ${workspaceFolderBasename}/package.json ${workspaceFolderBasename}/plugin.json",
"problemMatcher": []
},
{
"label": "Publish:PythonBackend",
"detail": "Add python files",
"type": "shell",
"group": "none",
"options": {
"cwd": "../"
},
"command": "find ${workspaceFolderBasename} -maxdepth 1 -type f -iname '*.py' -exec zip -r ${workspaceFolder}/dist/${workspaceFolderBasename}.zip {} \\;",
"problemMatcher": []
},
{
"label": "Publish:CompiledBackend",
"detail": "Add compiled backend files (precompile before running)",
"type": "shell",
"group": "none",
"options": {
"cwd": "dist"
},
"command": "mkdir -p ${workspaceFolderBasename}/bin; [ -d '${workspaceFolder}/backend/out/' ] && cp ${workspaceFolder}/backend/out/* ${workspaceFolderBasename}/bin/; find ${workspaceFolderBasename} -maxdepth 1 -type f -exec zip -r ${workspaceFolderBasename}.zip {} \\;; rm -rf ${workspaceFolderBasename}",
"problemMatcher": []
},
{
"label": "Publish:License",
"detail": "Add license file",
"type": "shell",
"group": "none",
"options": {
"cwd": "../"
},
"command": "find ${workspaceFolderBasename} -maxdepth 1 -type f \\( -iname 'license' -o -iname 'license.md' \\) -exec zip -r ${workspaceFolder}/dist/${workspaceFolderBasename}.zip {} \\;",
"problemMatcher": []
},
{
"label": "Publish:Readme",
"detail": "Add readme file",
"type": "shell",
"group": "none",
"options": {
"cwd": "../"
},
"command": "find ${workspaceFolderBasename} -maxdepth 1 -type f -iname 'readme.md' -exec zip -r ${workspaceFolder}/dist/${workspaceFolderBasename}.zip {} \\;",
"problemMatcher": []
},
{
"label": "Publish:Defaults",
"detail": "Add default files",
"type": "shell",
"group": "none",
"options": {
"cwd": "dist"
},
"command": "mkdir -p ${workspaceFolderBasename}; cp ${workspaceFolder}/defaults/* ${workspaceFolderBasename}/; find ${workspaceFolderBasename} -maxdepth 1 -type f -not -iname 'defaults.txt' -exec zip -r ${workspaceFolderBasename}.zip {} \\;; rm -rf ${workspaceFolderBasename}",
"problemMatcher": []
},
{
"label": "publish",
"detail": "Publish all files into a release zip archive for github",
"dependsOrder": "sequence",
"group": "test",
"dependsOn": [
"Publish:Clean",
"Publish:Required",
"Publish:PythonBackend",
"Publish:CompiledBackend",
"Publish:License",
"Publish:Readme",
"Publish:Defaults"
],
"problemMatcher": []
}
]
}

0 comments on commit 0f54f98

Please sign in to comment.