Skip to content

Commit

Permalink
Set minimum HA version during release flow (#2191)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Aug 29, 2021
1 parent b0fbafa commit 4640a27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:

- name: "Set version number"
run: |
sed -i "/MINIMUM_HA_VERSION = /c\MINIMUM_HA_VERSION = \"$(jq .homeassistant -r ${{ github.workspace }}/hacs.json)\"" ${{ github.workspace }}/custom_components/hacs/const.py
python3 ${{ github.workspace }}/manage/update_manifest.py --version ${{ steps.version.outputs.version }}
# Pack the HACS dir as a zip and upload to the release
- name: ZIP HACS Dir
run: |
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hacs/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
NAME_SHORT = "HACS"
DOMAIN = "hacs"
CLIENT_ID = "395a8e669c5de9f7c6e8"
MINIMUM_HA_VERSION = "2021.2.0"
MINIMUM_HA_VERSION = "0.0.0"
PROJECT_URL = "https://github.com/hacs/integration/"


Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/test_check_constrains.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def test_check_constrains_version(hacs: HacsBase, caplog: pytest.LogCaptur
await task.execute_task()
assert not hacs.system.disabled

hacs.core.ha_version = "1"
hacs.core.ha_version = "0"
with patch("os.path.exists", return_value=False):
await task.execute_task()
assert hacs.system.disabled
Expand Down

0 comments on commit 4640a27

Please sign in to comment.