1
0
mirror of https://github.com/containers/ramalama.git synced 2026-02-05 15:47:26 +01:00
Files
ramalama/hack/tree_status.sh
Daniel J Walsh 7d480a7182 Verify tree status
Verfy that there is no left over or modified files within the git tree
after running the tests.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-09-05 14:47:17 -04:00

20 lines
366 B
Bash
Executable File

#!/usr/bin/env bash
set -e
SUGGESTION="${SUGGESTION:-run \"make test\" and commit all changes.}"
STATUS=$(git status --porcelain)
if [[ -z $STATUS ]]
then
echo "tree is clean"
else
echo "tree is dirty, please $SUGGESTION"
echo ""
echo "$STATUS"
echo ""
echo "---------------------- Diff below ----------------------"
echo ""
git --no-pager diff
exit 1
fi