using v4.1.0.228 on Windows Server 2003, SP1:
while trying to update the versioning during build time, i would like to use an INI to set the version information on the projects.
the help alludes to the ability to use variables to set the versioning, but the version fields don't allow the entry of variables.
how are the variables used for this type of requirement?
thx!
You can set the values using a few lines of VBScript in the BeforeAction script event :
Action.MajorVersion = MyMajorVersionVariable
Action.MinorVersion = MyMinorVersionVariable
Action.RevisionVersion = MyRevisionVersionVariable
HTH
I am trying to have FinalBuilder increment the version number of the dll it is about to compile.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
My workflow was going to go something like this:
· Check if current(old) dll exists
· If it does
o ExtractVersionInfo (to get version of dll I am about to replace)- stored as VSNINFO
o Parse VSNINFO into a property set.
o Continue on…
The problem I am having is that the function ExtractReleaseVer seems to choke on VB6 version numbers obtained through using ExtractVersionInfo property. The major and minor extraction is fine, but I get a type mismatch on release. Two questions on this:
1. Is this a bug? I mean I can write my own version parser in VBScript- I just wanted to know if I am using this correctly.
2. Is there a better workflow for a. finding current version info, b. incrementing it?
Thanks,
Owen
Hi Owen,
At the moment the “best practices” method is probably to store the version numbers in an ini file and use the PropertySet From INI File and PropertySet Save To INI File actions. We do have an action to directly extract property set version info from a dll/exe on the “to-do” list, but it’s unfortunately not available yet.
However, the method you are using should work fine. What is the exact value of the VSNINFO variable? (you can find out by inserting Action.SendLogMessage(VSNINFO) in the AfterAction event of the Extract Version Info action.)
Hth.
- Angus
Thanks Angus.
I was able to work around this by doing the following:
-Extract Version Info
Sets the variable 'PRJ_BIN_VSN_OLD' to the extracted version number
-After Action script
Parses the version info from the variable into discreet variables for each part of the version:
Dim arrStrSplit
arrStrSplit = Split(PRJ_BIN_VSN_OLD,".")
MajorVSN = Right(arrStrSplit(0),1)
If (UBound(arrStrSplit) > 0) Then
MinorVSN = Right(arrStrSplit(1),1)
Else
MinorVSN = "0"
End If
If (UBound(arrStrSplit) > 1) Then
RevisionVSN = Right(arrStrSplit(2),1)
Else
RevisionVSN = "0"
End IF
VSN_NAME_OLD = MajorVSN & "." & MinorVSN & "." & RevisionVSN
-PropertySet assign properties
Set VSN_PS property set to my discreet variables:
MajorVersion = %MajorVSN%
MinorVersion = %MinorVSN%
RevisionVersion = %RevisionVSN%
We essentially just roll every version type up one from 0 to 9, I just have a bunch of if statements for each version type that run through (If %RevisionVSN% < 9 etc...) that increment it.
I've only gotten through VB6 projects so far, and it seems to work. Am looking at .NET versioning now.
Thanks again,
Owen