Skip to content

Commit

Permalink
Improve development environment, bump requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
klejejs committed Aug 9, 2024
1 parent b315788 commit 41b13be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion devcontainer.json → .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"vscode": {
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.formatting.provider": "black"
"python.formatting.provider": "black",
"editor.defaultFormatter": "ms-python.black-formatter"
},
"extensions": [
"GitHub.copilot",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
homeassistant==2024.4.1
ThermiaOnlineAPI==5.0.0
ThermiaOnlineAPI==5.1.0
5 changes: 5 additions & 0 deletions scripts/update_ThermiaOnlineAPI_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -e

manifest_file="./custom_components/thermia/manifest.json"
requirements_file="./requirements.txt"

latest_version_number=$(lastversion ThermiaOnlineAPI --at pip)
latest_version=ThermiaOnlineAPI==$latest_version_number
Expand All @@ -15,6 +16,10 @@ echo "Current version of ThermiaOnlineAPI: $current_version"
if [ "$current_version" != "$latest_version" ]; then
echo "Updating version to $latest_version"
version=$latest_version jq ".requirements = [env.version]" $manifest_file > tmp.$$.json && mv tmp.$$.json $manifest_file

# update requirements file to reflect correct version as well
cat $requirements_file | sed -E "s/$current_version/$latest_version/" > tmp.$$.txt && mv tmp.$$.txt $requirements_file

echo "ThermiaOnlineAPI version updated to $latest_version"
echo "LATEST_API_VERSION=$latest_version_number" >> $GITHUB_ENV
else
Expand Down

0 comments on commit 41b13be

Please sign in to comment.