summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-08-30 13:15:36 +0000
committerglx <glx@openttd.org>2008-08-30 13:15:36 +0000
commit01ce633a93a4238d9cf9ae9bc915f01a3a37d0a6 (patch)
tree9e11a6a5e60837148cbd6c8d1fec9dd1f005cba3 /projects
parent17998f7f98209ec0c641a87a7ab4ae5925a75936 (diff)
downloadopenttd-01ce633a93a4238d9cf9ae9bc915f01a3a37d0a6.tar.xz
(svn r14194) -Fix: don't use hardcoded character offsets to get hg revision. This make it similar to svn and git (ie without the ':').
Diffstat (limited to 'projects')
-rwxr-xr-xprojects/determineversion.vbs5
1 files changed, 3 insertions, 2 deletions
diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs
index 896d3e5e0..2920e958d 100755
--- a/projects/determineversion.vbs
+++ b/projects/determineversion.vbs
@@ -199,7 +199,7 @@ Function DetermineSVNVersion()
Set oExec = WshShell.Exec("git symbolic-ref HEAD")
If Err.Number = 0 Then
line = oExec.StdOut.ReadLine()
- line = Mid(line, InStrRev(line, "/")+1)
+ line = Mid(line, InStrRev(line, "/") + 1)
If line <> "master" Then
version = version & "-" & line
End If
@@ -214,7 +214,8 @@ Function DetermineSVNVersion()
Loop
End If
If Err.Number = 0 And oExec.ExitCode = 0 Then
- version = "h" & Mid(OExec.StdOut.ReadLine(), 19, 8)
+ line = OExec.StdOut.ReadLine()
+ version = "h" & Mid(line, InStrRev(line, ":") + 1, 8)
Set oExec = WshShell.Exec("hg status ../src")
If Err.Number = 0 Then
Do