Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-17-2003, 10:12 AM
dawson dawson is online now
Registered User
 
Join Date: 11-10-2003
Posts: 7
save project programmatically

Hello,

How can I save the build project programatically? I am incrementing the build number macro (which is contained in my build project file), but this file is also located in VSS. I need to increment the build number, save the build file, and then check the build file back in VSS.

I would think this should be fairly easy to do, as it is basically a neccessity for automated builds. (My build will be automated if that helps).

Thanks for any help,
Dawson
Reply With Quote
  #2  
Old 11-17-2003, 10:58 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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
Reply


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 02:20 PM.


Copyright © 1999-2023 Kinook Software, Inc.