Files
nixpkgs/pkgs/servers/home-assistant/build-custom-component/manifest-requirements-check-hook.sh
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

43 lines
1.2 KiB
Bash

# shellcheck shell=bash
# Setup hook to check HA manifest requirements
echo "Sourcing manifest-check-hook"
function manifestCheckPhase() {
echo "Executing manifestCheckPhase"
runHook preCheck
args=""
# shellcheck disable=SC2154
for package in "${ignoreVersionRequirement[@]}"; do
args+=" --ignore-version-requirement ${package}"
done
readarray -d '' manifests < <(
find . -type f \( \
-path ./manifest.json \
-o -path './custom_components/*/manifest.json' \
-o -path './custom_components/*/integrations/*/manifest.json' \
\) -print0
)
if [ "${#manifests[@]}" -gt 0 ]; then
# shellcheck disable=SC2068
echo Checking manifests ${manifests[@]}
# shellcheck disable=SC2068,SC2086
@pythonCheckInterpreter@ @checkManifest@ ${manifests[@]} $args
else
# shellcheck disable=SC2154
echo "No 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