configure: Fix BUILDID (again)
The previous commit made BUILDID use git for submodule, but for complex git setup (e.g. worktree) and older git version or dead .git 'link' it would blindly rely on the existence of the .git file even if git does not actually find anything. This would lead to possibly empty BUILDID which would fail building. Just always run the git command, and echo the version string if it failed Change-Id: Ied268d2150a30dc1146498e15fa8394afc8a8d0d
This commit is contained in:
2
configure
vendored
2
configure
vendored
@ -4886,7 +4886,7 @@ _ACEOF
|
||||
|
||||
ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
|
||||
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
|
||||
BUILDID=$( cd $IHK_ABS_SRCDIR; if [ ! -e .git ]; then echo $IHK_VERSION; else bash -c 'git rev-list -1 HEAD | cut -c1-8'; fi )
|
||||
BUILDID=$( git --git-dir=$IHK_ABS_SRCDIR/.git rev-parse --short HEAD 2>/dev/null || echo $IHK_VERSION )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: BUILDID=$BUILDID" >&5
|
||||
$as_echo "$as_me: BUILDID=$BUILDID" >&6;}
|
||||
if test "x$BUILDID" != "x" ; then
|
||||
|
||||
Reference in New Issue
Block a user