mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
(svn r22435) -Fix: Git revision detection would return too much when tags are involved.
This commit is contained in:
parent
e070f90aed
commit
29357ef65c
@ -99,7 +99,7 @@ elif [ -d "$ROOT_DIR/.git" ]; then
|
|||||||
# No rev? Maybe it is a custom git-svn clone
|
# No rev? Maybe it is a custom git-svn clone
|
||||||
REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"`
|
REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"`
|
||||||
fi
|
fi
|
||||||
TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null`"
|
TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@'`"
|
||||||
if [ -n "$TAG" ]; then
|
if [ -n "$TAG" ]; then
|
||||||
BRANCH=""
|
BRANCH=""
|
||||||
REV="$TAG"
|
REV="$TAG"
|
||||||
|
@ -227,6 +227,9 @@ Function DetermineSVNVersion()
|
|||||||
Loop
|
Loop
|
||||||
If oExec.ExitCode = 0 Then
|
If oExec.ExitCode = 0 Then
|
||||||
version = oExec.StdOut.ReadLine()
|
version = oExec.StdOut.ReadLine()
|
||||||
|
If Right(version, 2) = "^0" Then
|
||||||
|
version = Left(version, Len(version) - 2)
|
||||||
|
End If
|
||||||
branch = ""
|
branch = ""
|
||||||
End If ' oExec.ExitCode = 0
|
End If ' oExec.ExitCode = 0
|
||||||
End If ' Err.Number = 0
|
End If ' Err.Number = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user