Skip to content

Commit

Permalink
Add ability to restart/rebuild addon from vscode (#58)
Browse files Browse the repository at this point in the history
* Add ability to run/rebuild addon from vscode command palette

* Add missing newline

* Use 'ha addons' cmd in preference to docker where possible
  • Loading branch information
davet2001 authored Jun 18, 2024
1 parent a0192a2 commit 3033f65
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,47 @@
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Start Addon",
"type": "shell",
"command": "ha addons stop \"local_${input:addonName}\"; ha addons start \"local_${input:addonName}\"; docker logs --follow \"addon_local_${input:addonName}\"",
"group": {
"kind": "test",
"isDefault": false
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": [],
"runOptions": {
"reevaluateOnRerun": false
}
},
{
"label": "Rebuild and Start Addon",
"type": "shell",
"command": "ha addons rebuild \"local_${input:addonName}\"; ha addons start \"local_${input:addonName}\"; docker logs --follow \"addon_local_${input:addonName}\"",
"group": {
"kind": "test",
"isDefault": false
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
],
"inputs": [
{
"id": "addonName",
"type": "pickString",
"description": "Name of addon (to add your addon to this list, please edit .vscode/tasks.json)",
"options": [
"example",
]
}
]
}

0 comments on commit 3033f65

Please sign in to comment.