summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-08-02 19:48:54 +0000
committerglx <glx@openttd.org>2008-08-02 19:48:54 +0000
commitea570c81600edf40dfa6876d20e5e3a6ededb3d3 (patch)
tree83f20d6f4de3d93b2e7ba1daee291088f8612afd /projects
parent770d293788b2a99f50279f0443763ebc2fc2c395 (diff)
downloadopenttd-ea570c81600edf40dfa6876d20e5e3a6ededb3d3.tar.xz
(svn r13924) -Fix (r11531): determineversion.vbs could fail to find the right version with hg
Diffstat (limited to 'projects')
-rwxr-xr-xprojects/determineversion.vbs17
1 files changed, 16 insertions, 1 deletions
diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs
index fd5a85465..3fb7e6a6e 100755
--- a/projects/determineversion.vbs
+++ b/projects/determineversion.vbs
@@ -9,7 +9,7 @@ Sub FindReplaceInFile(filename, to_find, replacement)
data = file.ReadAll
file.Close
data = Replace(data, to_find, replacement)
- Set file = FSO.CreateTextFile(FileName, -1, 0)
+ Set file = FSO.CreateTextFile(filename, -1, 0)
file.Write data
file.Close
End Sub
@@ -141,6 +141,11 @@ Function DetermineSVNVersion()
' Do we have subversion installed? Check immediatelly whether we've got a modified WC.
Set oExec = WshShell.Exec("svnversion ../src")
If Err.Number = 0 Then
+ ' Wait till the application is finished ...
+ Do While oExec.Status = 0
+ Loop
+ End If
+ If Err.Number = 0 And oExec.ExitCode = 0 Then
Dim modified
If InStr(OExec.StdOut.ReadLine(), "M") Then
modified = "M"
@@ -178,6 +183,11 @@ Function DetermineSVNVersion()
Err.Clear
Set oExec = WshShell.Exec("git rev-parse --verify --short=8 HEAD")
If Err.Number = 0 Then
+ ' Wait till the application is finished ...
+ Do While oExec.Status = 0
+ Loop
+ End If
+ If Err.Number = 0 And oExec.ExitCode = 0 Then
version = "g" & oExec.StdOut.ReadLine()
Set oExec = WshShell.Exec("git diff-index --exit-code --quiet HEAD ../src")
Do While oExec.Status = 0 And Err.Number = 0
@@ -199,6 +209,11 @@ Function DetermineSVNVersion()
Err.Clear
Set oExec = WshShell.Exec("hg tip")
If Err.Number = 0 Then
+ ' Wait till the application is finished ...
+ Do While oExec.Status = 0
+ Loop
+ End If
+ If Err.Number = 0 And oExec.ExitCode = 0 Then
version = "h" & Mid(OExec.StdOut.ReadLine(), 19, 8)
Set oExec = WshShell.Exec("hg status ../src")
If Err.Number = 0 Then