build.sh: fix handling git safe protection

This commit is contained in:
Benjamin Renard 2023-07-10 12:46:44 +02:00
parent 44bd9a6446
commit 3a443e1fa5
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -9,6 +9,12 @@ cd $( dirname $0 )
echo "Clean previous build..."
rm -fr dist deb_dist
if [ -n "$CI" -a $UID -eq 0 ]
then
echo "CI environment detected, set current directory as git safe for root"
git config --global --add safe.directory $(pwd)
fi
echo "Detect version using git describe..."
VERSION="$( git describe --tags|sed 's/^[^0-9]*//' )"