Przeglądaj źródła

Merge pull request #22047 from ncopa/fix-build-from-tarball

Fix detection of git commit during build from tarball
David Calavera 9 lat temu
rodzic
commit
6472a6d9e5
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      hack/make.sh

+ 1 - 1
hack/make.sh

@@ -79,7 +79,7 @@ DEFAULT_BUNDLES=(
 )
 )
 
 
 VERSION=$(< ./VERSION)
 VERSION=$(< ./VERSION)
-if command -v git &> /dev/null && git rev-parse &> /dev/null; then
+if command -v git &> /dev/null && [ -d .git ] && git rev-parse &> /dev/null; then
 	GITCOMMIT=$(git rev-parse --short HEAD)
 	GITCOMMIT=$(git rev-parse --short HEAD)
 	if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
 	if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
 		GITCOMMIT="$GITCOMMIT-unsupported"
 		GITCOMMIT="$GITCOMMIT-unsupported"