Files
cozystack/hack/pre-commit-generate-packages.sh
frolov.so 7280e2d7cc ci(pre-commit): detect schema drift across all packages
Restricting schema regeneration to application and extra packages left
system and library metadata outside the pre-commit drift check.

The regression tests must exercise the repository unit-test path;
bats-core lifecycle hooks and result helpers are unavailable in that
runner and prevent the assertions from executing.

Fixes cozystack/cozystack#4416

Assisted-by: LLM
Signed-off-by: frolov.so <opsmon.sh@yandex.com>
2026-09-27 16:58:28 +03:00

13 lines
310 B
Bash
Executable File

#!/bin/sh
set -eu
for makefile in ./packages/*/*/Makefile; do
[ -f "$makefile" ] || continue
if awk '/^generate[[:space:]]*:/ { found=1 } END { exit !found }' "$makefile"; then
dir=${makefile%/Makefile}
echo "Running make generate in $dir"
make generate -C "$dir"
fi
done