Hi all! While working on the Kitsu Addon I needed a way to quickly run the updated service code and upload any updated server code to my Ayon instance.
With this I made these tasks in VSCode:
{
"version": "2.0.0",
"tasks": [
{
"label": "Build and upload addon",
"type": "shell",
"command": "",
"args": [
"${workspaceFolder}/.venv/Scripts/Activate.ps1;",
"python",
"ayon-kitsu/create_package.py",
"--upload",
"--output",
"dist/packages"
],
"problemMatcher": []
},
{
"label": "Run Processor Service",
"type": "shell",
"command": "",
"args": [
"${workspaceFolder}/.venv/Scripts/Activate.ps1;",
"cd",
"${workspaceFolder}/ayon-kitsu/services/;",
"make",
"SERVICE=processor",
"run"
],
"presentation": {
"group": "kitsu_leecher"
},
"problemMatcher": []
},
{
"label": "Run Leecher Service",
"type": "shell",
"command": "",
"args": [
"${workspaceFolder}/.venv/Scripts/Activate.ps1;",
"cd",
"${workspaceFolder}/ayon-kitsu/services/;",
"make",
"SERVICE=leecher",
"run"
],
"presentation": {
"group": "kitsu_leecher"
}
},
{
"label": "Run Both Services",
"dependsOn": [
"Run Leecher Service",
"Run Processor Service"
],
"command": "echo",
"args": [
"Both services completed"
],
"problemMatcher": []
}
]
}
Place this text in .vscode/tasks.json
in your vscode workspace. You execute the tasks using ctrl+p
, Tasks: Run task
and then select what task to run.
I also included a second service and a task to run both of them at the same time.
This was made for Window and my workspace structure. You will need to modify the tasks to execute the correct files in the correct locations but with these tasks I sped up my development a lot.
I hope it will help others also