mirror of
https://github.com/alexhopeoconnor/default.git
synced 2026-10-19 01:11:32 +10:00
* Test new check * Add quote * test * test * move check * move back * use env * test multistep * test trigger * if: github.event.label.name * quotes * hassfest? * Fix clone * Update hassfest * check hassfest * Use real domain * Lmit * Test hassfest * Check domain * Fix domain * No changes * Enable on unlable * Change HACS validate * Move inputs * Add dummy integration * TEst * Move to env * Fix repo * Remove entry
22 lines
502 B
Python
22 lines
502 B
Python
import json
|
|
import os
|
|
from glob import glob
|
|
|
|
|
|
def get_hacs_manifest():
|
|
files = []
|
|
for dir, _, _ in os.walk("/tmp/addition"):
|
|
files.extend(glob(os.path.join(dir, "*hacs.json")))
|
|
|
|
if len(files) != 1:
|
|
print("No HACS manifest")
|
|
exit(1)
|
|
|
|
hacs_manifest = files.pop()
|
|
print(f"Found HACS manifest at {hacs_manifest.replace('/tmp/addition','')}")
|
|
|
|
with open(hacs_manifest, "r") as mf:
|
|
hacs_manifest = json.loads(mf.read())
|
|
|
|
return hacs_manifest or {}
|