Skip to content

Commit

Permalink
Add tasks and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
astrandb committed Jul 23, 2023
1 parent 575690e commit df2e960
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 19 deletions.
50 changes: 31 additions & 19 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Home Assistant on port 9124",
"type": "shell",
"command": "scripts/develop",
"problemMatcher": []
},
{
"label": "Upgrade Home Assistant to latest (beta)",
"type": "shell",
"command": "scripts/upgrade",
"problemMatcher": []
},
{
"label": "Lint with ruff",
"type": "shell",
"command": "scripts/lint",
"problemMatcher": []
}
{
"label": "Run Home Assistant on port 9123",
"type": "shell",
"command": "scripts/develop",
"problemMatcher": []
},
{
"label": "Upgrade Home Assistant to latest (beta)",
"type": "shell",
"command": "scripts/upgrade",
"problemMatcher": []
},
{
"label": "Load Home Assistant from github - dev branch",
"type": "shell",
"command": "scripts/dev-branch",
"problemMatcher": []
},
{
"label": "Load specific version of Home Assistant",
"type": "shell",
"command": "scripts/specific-version",
"problemMatcher": []
},
{
"label": "Lint with ruff",
"type": "shell",
"command": "scripts/lint",
"problemMatcher": []
}
]
}
}
7 changes: 7 additions & 0 deletions scripts/dev-branch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

python3 -m pip --disable-pip-version-check install --upgrade git+https://github.com/home-assistant/home-assistant.git@dev
6 changes: 6 additions & 0 deletions scripts/develop
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ logger:
homeassistant.components.viva: debug
" >> config/configuration.yaml
fi
if ! grep -R "debugpy:" config/configuration.yaml >> /dev/null;then
echo "
# Uncomment the line below if you want to use debugger
# debugpy:
" >> config/configuration.yaml
fi


# Set the path to custom_components
Expand Down
8 changes: 8 additions & 0 deletions scripts/specific-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

read -p 'Set Home Assistant version: ' -r version
python3 -m pip --disable-pip-version-check install --upgrade homeassistant=="$version"

0 comments on commit df2e960

Please sign in to comment.