Display git info in pm3_tests.sh only if doable

This should fix the need for da550dbec7 (6ab816ab956024f7eb2767197fe7fa5a5d0c5b32)
This commit is contained in:
Philippe Teuwen 2021-10-04 21:05:04 +02:00
commit 1cc1a3857f

View file

@ -216,11 +216,13 @@ if [ "$TRAVIS_COMMIT" ]; then
fi fi
fi fi
echo -n "git branch: " if command -v git >/dev/null && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
git describe --all echo -n "git branch: "
echo -n "git sha: " git describe --all
git rev-parse HEAD echo -n "git sha: "
echo "" git rev-parse HEAD
echo ""
fi
while true; do while true; do
if $TESTALL || $TESTCOMMON; then if $TESTALL || $TESTCOMMON; then