From 4438cff79b2f7a731b98e01c94cbf6bdb2604ff4 Mon Sep 17 00:00:00 2001 From: Mikhail Yevchenko Date: Mon, 7 Sep 2026 17:06:51 +0000 Subject: [PATCH] Report which submodule check failed in build.sh instead of exiting silently --- g15stats | 2 +- packaging/build.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/g15stats b/g15stats index 076641c..7c06a80 160000 --- a/g15stats +++ b/g15stats @@ -1 +1 @@ -Subproject commit 076641c86787a5f29ecb9cebbe8443c109275994 +Subproject commit 7c06a8089db506fdeed7cd6e55b91caf0958563b diff --git a/packaging/build.sh b/packaging/build.sh index 76e95af..4da451b 100644 --- a/packaging/build.sh +++ b/packaging/build.sh @@ -17,8 +17,10 @@ git config --global --add safe.directory "$root" for source in libg15 libg15render g15daemon g15macro g15stats; do git config --global --add safe.directory "$root/$source" pin=$(git -C "$root" ls-files --stage -- "$source" | awk '$1 == 160000 {print $2}') - [[ -n $pin && $(git -C "$root/$source" rev-parse HEAD) == "$pin" ]] - [[ -z $(git -C "$root/$source" status --porcelain --untracked-files=all) ]] + [[ -n $pin && $(git -C "$root/$source" rev-parse HEAD) == "$pin" ]] \ + || { echo "$source: HEAD does not match the committed gitlink pin" >&2; exit 1; } + [[ -z $(git -C "$root/$source" status --porcelain --untracked-files=all) ]] \ + || { echo "$source: submodule has uncommitted or untracked changes; commit or stash them first" >&2; exit 1; } done git -C "$root" submodule status --recursive -- libg15 libg15render g15daemon g15macro g15stats > "$out/SUBMODULES" if grep -q '^[+U-]' "$out/SUBMODULES"; then echo 'Submodule pin mismatch or missing module' >&2; exit 1; fi