Skip to content

Commit 40df038

Browse files
committed
build: add git folder to safe.directory to avoid error
To make sure the git describe command works, we need to add the current folder to safe.directory. Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
1 parent 1c52007 commit 40df038

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

build-aux/release

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# SPDX-License-Identifier: GPL-2.0-or-later
55

66
import datetime
7+
import os
78
import subprocess
89

910

@@ -14,6 +15,7 @@ def run(*args):
1415
# Get a human readable name of this commit:
1516
# - build from tag: v2.4.5
1617
# - build without a tag: v2.4.5-3-gc238eff
18+
run("git", "config", "--global", "--add", "safe.directory", os.getcwd())
1719
commit_name = run("git", "describe", "--tags", "--match", "v[0-9]*")
1820

1921
if "-" in commit_name:

0 commit comments

Comments
 (0)