mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: adjust wmakeBuildInfo to work with older git versions as well
This commit is contained in:
@ -201,8 +201,9 @@ getMakeInfo()
|
|||||||
patch="$(sed -ne 's@^patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/build-info 2>/dev/null)"
|
patch="$(sed -ne 's@^patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/build-info 2>/dev/null)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build info from git
|
# Build info from git. Use short date format (YYYY-MM-DD) and sed instead
|
||||||
build="$(git --git-dir=$WM_PROJECT_DIR/.git log -1 --date='format:%y%m%d' --format='%h-%ad' 2>/dev/null)"
|
# of the newer --date='format:%y%m%d'
|
||||||
|
build="$(git --git-dir=$WM_PROJECT_DIR/.git log -1 --date=short --format='%h=%ad' 2>/dev/null|sed 's/-//g;s/=/-/')"
|
||||||
|
|
||||||
# Branch info from git
|
# Branch info from git
|
||||||
if [ -n "$build" ]
|
if [ -n "$build" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user