Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-16-2009, 05:10 PM
ktak ktak is online now
Registered User
 
Join Date: 08-31-2009
Posts: 5
Duplicate build number after increment

I am using VBP 6.5 and Window's Scheduled Task to trigger an automatic build. Within the build, there is a step that increments the build number and emails us with that information after a successful build.

The problem is that we often see duplicate build numbers.
ie.
.....
build 390 Success.
build 391 Success.
build 391 Success.
build 392 Success.
build 394 Success.
build 395 Success
......

This duplication occurs quite often, even when the builds are completing normally.

Below is the code for the incrementation step.

' retrieve the current BUILD_NUM macro from the global macros
' collection
Set objMacro = Application.Macros(vbldGlobal).Item("BUILD_NUM")

If objMacro Is Nothing Then
' if the macro doesn't exist yet, initialize to one
Application.Macros(vbldGlobal).Add "BUILD_NUM", "1"
Set objMacro = Application.Macros(vbldGlobal).Item("BUILD_NUM")
Builder.LogMessage "Incremented BUILD_NUM macro to " & objMacro.Value
Else
' otherwise increment the value
objMacro.Value = Clng(objMacro.Value)+1
Builder.LogMessage "Incremented BUILD_NUM macro to " & objMacro.Value
End If


Anyone else experience this issue?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 04:10 PM.


Copyright © 1999-2023 Kinook Software, Inc.