Skip to content

Commit

Permalink
Mark current dir as safe for git in build-srpm.sh
Browse files Browse the repository at this point in the history
Mark current directory as safe for git operation to be able to create
RPM release properly.

Signed-off-by: Martin Perina <[email protected]>
  • Loading branch information
mwperina committed Apr 26, 2024
1 parent 66c3b25 commit 535a933
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .automation/build-srpm.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash -xe

# From git 2.35.2 we need to mark temporary directory, where the project is cloned to, as safe, otherwise
# git commands won't work because of the fix for CVE-2022-24765
git config --global --add safe.directory "$(pwd)"

# git hash of current commit should be passed as the 1st paraameter
if [ "${GITHUB_SHA}" == "" ]; then
GIT_HASH=$(git rev-list HEAD | wc -l)
Expand Down

0 comments on commit 535a933

Please sign in to comment.