diff --git a/build.sh b/build.sh index e0b7d15..3d2bba6 100755 --- a/build.sh +++ b/build.sh @@ -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]*//' )"