ae2dc6aea6
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
25 lines
741 B
Bash
25 lines
741 B
Bash
# Setup hook to check HA manifest requirements
|
|
echo "Sourcing manifest-requirements-check-hook"
|
|
|
|
function manifestCheckPhase() {
|
|
echo "Executing manifestCheckPhase"
|
|
runHook preCheck
|
|
|
|
manifests=$(shopt -s nullglob; echo $out/custom_components/*/manifest.json)
|
|
|
|
if [ ! -z "$manifests" ]; then
|
|
echo Checking manifests $manifests
|
|
@pythonCheckInterpreter@ @checkManifest@ $manifests
|
|
else
|
|
echo "No custom component manifests found in $out" >&2
|
|
exit 1
|
|
fi
|
|
|
|
runHook postCheck
|
|
echo "Finished executing manifestCheckPhase"
|
|
}
|
|
|
|
if [ -z "${dontCheckManifest-}" ] && [ -z "${installCheckPhase-}" ]; then
|
|
echo "Using manifestCheckPhase"
|
|
appendToVar preDistPhases manifestCheckPhase
|
|
fi
|