-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try and fail to get local addon working, but it'll be useful for cust… (
#43) * try and fail to get local addon working, but it'll be useful for custom_component i hope * addon linter has maxdepth 2 * addon helper doesn't work without top level dirs
- Loading branch information
Showing
64 changed files
with
121 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM ghcr.io/home-assistant/devcontainer:addons | ||
|
||
RUN apt-get update && apt-get install -y python3 python3-venv python3-pip | ||
|
||
# https://code.visualstudio.com/remote/advancedcontainers/start-processes#_adding-startup-commands-to-the-docker-image-instead | ||
COPY docker-entrypoint.sh / | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "sleep", "infinity" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "Mindctrl Devcontainer based on HASS addon", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"appPort": [ | ||
"7123:8123", | ||
"7357:4357", | ||
"80:80" | ||
], | ||
"postAttachCommand": ". .venv/bin/activate", | ||
"runArgs": [ | ||
"-e", | ||
"GIT_EDITOR=code --wait", | ||
"--privileged" | ||
], | ||
"containerEnv": { | ||
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"timonwong.shellcheck", | ||
"esbenp.prettier-vscode", | ||
"ms-python.python" | ||
], | ||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "/usr/bin/bash" | ||
}, | ||
"zsh": { | ||
"path": "/usr/bin/zsh" | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"python.terminal.activateEnvInCurrentTerminal": true, | ||
"python.defaultInterpreterPath": ".venv/bin/python", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
} | ||
}, | ||
"mounts": [ | ||
"type=volume,target=/var/lib/docker" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Running mindctrl devcontainer entrypoint..." | ||
|
||
echo "running original bootstrap" | ||
bash devcontainer_bootstrap | ||
|
||
if [ -d "./.venv" ]; then | ||
echo ".venv does exist." | ||
else | ||
echo "Create venv" | ||
python3 -m venv ./.venv | ||
fi | ||
|
||
echo "Activating venv" | ||
source ./.venv/bin/activate | ||
python -m pip install --upgrade pip | ||
|
||
echo "install source" | ||
python -m pip install -e ./python | ||
|
||
echo "install requirements" | ||
python -m pip install -r ./tests/test-requirements.txt | ||
|
||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,31 +11,14 @@ on: | |
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
find: | ||
name: Find add-ons | ||
runs-on: ubuntu-latest | ||
outputs: | ||
addons: ${{ steps.addons.outputs.addons_list }} | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔍 Find add-on directories | ||
id: addons | ||
uses: home-assistant/actions/helpers/find-addons@master | ||
|
||
lint: | ||
name: Lint add-on ${{ matrix.path }} | ||
name: Lint add-on mindctrl | ||
runs-on: ubuntu-latest | ||
needs: find | ||
strategy: | ||
matrix: | ||
path: ${{ fromJson(needs.find.outputs.addons) }} | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🚀 Run Home Assistant Add-on Lint | ||
uses: frenck/[email protected] | ||
with: | ||
path: "./${{ matrix.path }}" | ||
path: "./addons/mindctrl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters