View Single Post
  #2  
Old 11-17-2003, 09:58 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,029
Lightbulb

See http://www.kinook.com/Forum/showthread.php?threadid=245

Although, you may want to consider storing the build number elsewhere. It is preferable to separate data (build number) and logic (the .bld project) when possible. If other changes are made to the project during the build session (for instance, temporarily unchecking a step) and they aren't changed back, those changes will also get saved, which may not be desirable.

One alternative would be to store the build number in a text file. Create a one line text file with the initial build number and add to source control. Then add a Set Macro step at the beginning of the build project to read the first line of the text file into a temporary macro (i.e., BUILD_NUM) by specifying a Value of:

[vbld_FSO().OpenTextFile("filename").ReadLine()]

then use %BUILD_NUM% to reference the build number from build steps; increment BUILD_NUM as usual, then use a Write File step of

%BUILD_NUM%

to write the incremented build number back out to the file. Check the text file in/out of source control as part of the build process. The .bld file only needs to be checked out when the project logic needs to be modified.
Reply With Quote