Skip to content

Commit

Permalink
0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LaggAt committed Apr 5, 2022
1 parent c5ccf84 commit 843985e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// "appPort": [
// "9123:8123"
// ],
"postCreateCommand": "/bin/chmod +x /workspaces/hacs-govee/.devcontainer/postCreateContainer.sh && /workspaces/hacs-govee/.devcontainer/postCreateContainer.sh",
"postCreateCommand": "/bin/chmod +x /workspaces/hacs-govee/.devcontainer/*.sh && /workspaces/hacs-govee/.devcontainer/postCreateContainer.sh",
"extensions": [
"cschleiden.vscode-github-actions",
"github.vscode-pull-request-github",
Expand Down
20 changes: 1 addition & 19 deletions .devcontainer/postCreateContainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,6 @@ cp -r ./container/rootfs/common/* /
chmod +x /usr/bin/container
/usr/bin/container install

/bin/echo ------------ postCreateCommand symlink our component ------------
/bin/mkdir -p /config/custom_components
/bin/ln -s /workspaces/hacs-govee/custom_components/govee /config/custom_components/govee

/bin/echo ------------ postCreateCommand container install ------------
pip install -e /workspaces/hacs-govee/.git-subtree/python-govee-api/

/bin/echo ------------ postCreateCommand python/pip ------------
/usr/local/bin/python3 -m pip install --upgrade pip
/usr/local/bin/pip3 install black colorlog debugpy pexpect pygatt pylint PyNaCl==1.3.0
/usr/local/bin/pip3 install -r /workspaces/hacs-govee/requirements_test.txt

/bin/echo ------------ postCreateCommand install hacs ------------
mkdir -p /src/hacs
cd /src/hacs
/bin/mkdir -p /config/custom_components/hacs
/usr/bin/wget https://github.com/hacs/integration/releases/latest/download/hacs.zip
/usr/bin/unzip hacs.zip -d /config/custom_components/hacs
/bin/rm hacs.zip
/workspaces/hacs-govee/.devcontainer/postHassUpdated.sh

/bin/echo ------------ postCreateCommand finished ------------
26 changes: 26 additions & 0 deletions .devcontainer/postHassUpdated.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

/bin/echo ------------ postCreateCommand downgrade pip packages with breaking changes ------------
## downgrade jinja2 as they dropped contextfilter and current home assistant needs this: https://jinja.palletsprojects.com/en/3.0.x/changes/
## also downgrade markupsafe for dropped soft_unicode: https://markupsafe.palletsprojects.com/en/2.1.x/changes/#version-2-1-0
pip install --upgrade jinja2==2.11.3 markupsafe==2.0.1

/bin/echo ------------ postCreateCommand symlink our component ------------
/bin/mkdir -p /config/custom_components
/bin/ln -s /workspaces/hacs-govee/custom_components/govee /config/custom_components/govee

/bin/echo ------------ postCreateCommand container install ------------
pip install -e /workspaces/hacs-govee/.git-subtree/python-govee-api/

/bin/echo ------------ postCreateCommand python/pip ------------
/usr/local/bin/python3 -m pip install --upgrade pip
/usr/local/bin/pip3 install black colorlog debugpy pexpect pygatt pylint PyNaCl==1.3.0
/usr/local/bin/pip3 install -r /workspaces/hacs-govee/requirements_test.txt

/bin/echo ------------ postCreateCommand install hacs ------------
mkdir -p /src/hacs
cd /src/hacs
/bin/mkdir -p /config/custom_components/hacs
/usr/bin/wget -c https://github.com/hacs/integration/releases/latest/download/hacs.zip
/usr/bin/unzip -o hacs.zip -d /config/custom_components/hacs
/bin/rm hacs.zip

4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
{
"label": "Upgrade Home Assistant to latest dev",
"type": "shell",
"command": "container install",
"command": "container install; /workspaces/hacs-govee/.devcontainer/postHassUpdated.sh",
"problemMatcher": []
},
{
"label": "Install a specific version of Home Assistant",
"type": "shell",
"command": "container set-version",
"command": "container set-version; /workspaces/hacs-govee/.devcontainer/postHassUpdated.sh",
"problemMatcher": []
}//,
// {
Expand Down
4 changes: 2 additions & 2 deletions custom_components/govee/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"codeowners": ["@LaggAt"],
"domain": "govee",
"name": "Govee",
"version": "0.2.1",
"version": "0.2.2",
"config_flow": true,
"documentation": "https://github.com/LaggAt/hacs-govee/blob/master/README.md",
"issue_tracker": "https://github.com/LaggAt/hacs-govee/issues",
"requirements": ["govee-api-laggat==0.2.1", "dacite==1.6.0"],
"requirements": ["govee-api-laggat==0.2.2", "dacite==1.6.0"],
"iot_class": "cloud_polling",
"ssdp": [],
"zeroconf": [],
Expand Down
4 changes: 2 additions & 2 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "govee",
"hacs": "0.2.1",
"hacs": "0.2.2",
"domains": [
"light"
],
"iot_class": "Cloud Polling",
"homeassistant": "2021.4.5"
"homeassistant": "2022.5.0"
}

0 comments on commit 843985e

Please sign in to comment.