From c1218124e85f69f9bee9d2ce6b7c934314bc3ee7 Mon Sep 17 00:00:00 2001 From: Martin Perina Date: Thu, 1 Feb 2024 14:01:09 +0100 Subject: [PATCH] Mark git tmp directory as safe for SRPM build Signed-off-by: Martin Perina --- .automation/build-srpm.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.automation/build-srpm.sh b/.automation/build-srpm.sh index f10aecb..37cb38c 100755 --- a/.automation/build-srpm.sh +++ b/.automation/build-srpm.sh @@ -1,5 +1,8 @@ #!/bin/bash -xe +# Mark current directory as safe for git to be able to parse git hash +git config --global --add safe.directory $(pwd) + # When building on GitHub we should use GITHUB_SHA environment variable, otherwise parse has from git if [ "${GITHUB_SHA}" == "" ]; then GIT_HASH=$(git rev-list HEAD | wc -l)