Skip to content

Commit

Permalink
Update update_manifest script
Browse files Browse the repository at this point in the history
  • Loading branch information
Limych committed Feb 26, 2024
1 parent 5a7f528 commit 2b2b7d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions custom_components/integration_blueprint/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"domain": "",
"name": "",
"domain": "integration_blueprint",
"name": "Integration blueprint",
"codeowners": [
"@Limych"
],
Expand All @@ -10,5 +10,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "",
"requirements": [],
"version": ""
"version": "0.0.0"
}
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "",
"name": "Integration blueprint",
"filename": "integration_blueprint.zip",
"hide_default_branch": true,
"homeassistant": "2023.8.0",
Expand Down
10 changes: 5 additions & 5 deletions scripts/update_manifest
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ component=$(ls -q "${ROOT}/custom_components/" | grep -v __ | head -n 1)
const_path="custom_components/${component}/const.py"
reqs_path="requirements.txt"

name=$(grep "^NAME: Final =" ${const_path} | sed -E "s/^[^\"]+\"([^\"]*).*$/\\1/")
domain=$(grep "^DOMAIN: Final =" ${const_path} | sed -E "s/^[^\"]+\"([^\"]*).*$/\\1/")
version=$(grep "^VERSION: Final =" ${const_path} | sed -E "s/^[^\"]+\"([^\"]*).*$/\\1/")
issue_url=$(grep "^ISSUE_URL: Final =" ${const_path} | sed -E "s/^[^\"]+\"([^\"]*).*$/\\1/")
ha_version=$(grep "^homeassistant>=" ${reqs_path} | sed -E "s/^[^=]+=(\S*).*$/\\1/")
name=$(grep -Ei "^NAME(: Final)? =" ${const_path} | sed -E "s/^[^\"]+\"([^\"]*).*$/\\1/")
domain=$(grep -Ei "^DOMAIN(: Final)? =" ${const_path} | sed -E "s/^[^\"]+\"([^\"]*).*$/\\1/")
version=$(grep -Ei "^VERSION(: Final)? =" ${const_path} | sed -E "s/^[^\"]+\"([^\"]*).*$/\\1/")
issue_url=$(grep -Ei "^ISSUE_URL(: Final)? =" ${const_path} | sed -E "s/^[^\"]+\"([^\"]*).*$/\\1/")
ha_version=$(grep -Ei "^homeassistant>=" ${reqs_path} | sed -E "s/^[^=]+=(\S*).*$/\\1/")

log.info "Update manifest.json data..."
manifest_path="custom_components/${component}/manifest.json"
Expand Down

0 comments on commit 2b2b7d8

Please sign in to comment.