Report which submodule check failed in build.sh instead of exiting silently
Debian 13 packages / build (push) Successful in 3m59s
Debian 13 packages / build (push) Successful in 3m59s
This commit is contained in:
1 parent
9743898fa2
commit
4438cff79b
2 files changed
+5
-3
No files matched your search
+4
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user