-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
86 additions
and
19 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 |
---|---|---|
@@ -1,18 +1,16 @@ | ||
## What's Changed | ||
|
||
* Add basic support for fan by @mape in <https://github.com/matt8707/ha-fusion/pull/86> | ||
* Make drawer responsive by @janiskelemen in <https://github.com/matt8707/ha-fusion/pull/84> | ||
* Make buttons and sections responsive on mobile by @janiskelemen in <https://github.com/matt8707/ha-fusion/pull/87> | ||
* update mobile support by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/92> | ||
* Fix history infinite loop by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/98> | ||
* Add person image api by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/99> | ||
* Bugfix: Show Details on Interaction Toggle Retention by @xrolfex in <https://github.com/matt8707/ha-fusion/pull/100> | ||
* Update mobile support by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/101> | ||
* show_details_on_interaction -> show_more_info by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/102> | ||
* Add onoff light by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/103> | ||
|
||
## New Contributors | ||
|
||
* @mape made their first contribution in <https://github.com/matt8707/ha-fusion/pull/86> | ||
|
||
**Full Changelog**: <https://github.com/matt8707/ha-fusion/compare/2024.1.1...2024.1.2> | ||
## What's Changed | ||
|
||
* Fix scale and position for cameras with non 16:9 aspect ratio by @mape in <https://github.com/matt8707/ha-fusion/pull/108> | ||
* Adjust 12hr sidebar time, closes #104 by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/110> | ||
* Change camera scaling from cover to contain by @mape in <https://github.com/matt8707/ha-fusion/pull/109> | ||
* Add input_datetime and datetime button support by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/118> | ||
* Add sidebar timer name, closes #107 by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/122> | ||
* Optimize loading of icons by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/131> | ||
* Improve entity select dropdown performance by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/133> | ||
* Add 'text' and 'input_text' button support by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/134> | ||
* Add 'counter' button modal support by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/135> | ||
* Add state precision modal options by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/136> | ||
* Add 'todo' button modal support by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/140> | ||
* Add support for 'close_popup' event, closes #138 by @matt8707 in <https://github.com/matt8707/ha-fusion/pull/141> | ||
|
||
**Full Changelog**: <https://github.com/matt8707/ha-fusion/compare/2024.1.2...2024.1.3> |
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,69 @@ | ||
""" | ||
cd ~/Developer/addon-ha-fusion | ||
python3 PUBLISH.py | ||
""" | ||
|
||
import urllib.request | ||
import json | ||
import subprocess | ||
|
||
|
||
def get_latest_release(): | ||
url = "https://api.github.com/repos/matt8707/ha-fusion/releases/latest" | ||
with urllib.request.urlopen(urllib.request.Request(url)) as response: | ||
return json.loads(response.read().decode()) | ||
|
||
|
||
def update_config_yaml(version): | ||
file_path = "config.yaml" | ||
with open(file_path, "r") as file: | ||
lines = file.readlines() | ||
|
||
with open(file_path, "w") as file: | ||
for line in lines: | ||
if line.strip().startswith("version:"): | ||
file.write(f"version: {version}\n") | ||
else: | ||
file.write(line) | ||
|
||
|
||
def update_changelog_md(release_notes): | ||
file_path = "CHANGELOG.md" | ||
with open(file_path, "w") as file: | ||
file.write(release_notes) | ||
|
||
|
||
def git_commit(version): | ||
subprocess.run(["git", "add", "config.yaml", "CHANGELOG.md"], check=True) | ||
subprocess.run(["git", "commit", "-m", version], check=True) | ||
|
||
|
||
try: | ||
# get ha-fusion release data | ||
data = get_latest_release() | ||
|
||
# update version in config.yaml | ||
version = data.get("tag_name") | ||
if not version: | ||
raise ValueError("missing version") | ||
update_config_yaml(version) | ||
print(f"INFO: config.yaml updated to {version}") | ||
|
||
# update release notes in CHANGELOG.md | ||
release_notes = data.get("body") | ||
if not release_notes: | ||
raise ValueError("missing release_notes") | ||
update_changelog_md(release_notes) | ||
print("INFO: CHANGELOG.md updated\n") | ||
print(release_notes) | ||
|
||
# git commit changes | ||
prompt = input("\nPROMPT: commit changes to git? (y/n): ").strip().lower() | ||
if prompt == "y": | ||
git_commit(version) | ||
print("INFO: changes committed to git") | ||
else: | ||
print("INFO: git commit skipped") | ||
|
||
except Exception as error: | ||
print(f"An error occurred: {error}") |
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