Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (https://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   VSS History to File (https://www.kinook.com/Forum/showthread.php?t=786)

dprice 01-20-2005 02:07 PM

VSS History to File
 
Hello,

I have a build step based on one of your VSS samples that displays the history based on a label. I would like to save this output into its own text file (in addition to the regular build log). Is there a way to do this?

Thanks in advance!
Derek

kinook 01-20-2005 03:28 PM

Put the following in the 'Additional command-line options' field on the SourceSafe action's Options tab:

"-O&c:\out.txt"

This will redirect the output to the file specified [1]. Then add the following in the step's script code (Script Editor button | Step tab) to also get the contents logged in the build:

Function vbld_StepDone()
If vbld_FSO.FileExists("c:\out.txt") Then
Builder.LogMessage vbld_GetFileContents("c:\out.txt")
End If
End Function

http://msdn.microsoft.com/library/de...ne_SwitchO.asp

dprice 01-20-2005 03:58 PM

Outstanding support and response time!

The VSS history to log is now working, but not the step of injecting the history into build log.

In my case, here's the VSS additional command-line:
-O&%PROJDIR%\F6TesTDotNetPort.root\F6TesTDotNetPort\% BUILD_HISTORY_LOG%

In the Script Editor Step tab, I have this:
Function vbld_StepDone()
If vbld_FSO.FileExists("%PROJDIR%\F6TesTDotNetPort.root\F6TesTDotNetPort\% BUILD_HISTORY_LOG%") Then
Builder.LogMessage vbld_GetFileContents("%%PROJDIR%\F6TesTDotNetPort.root\F6TesTDotNetPort\ %BUILD_HISTORY_LOG%")
End If
End Function

Any idea why it's not firing the StepDone call?

Thanks!
Derek

kinook 01-20-2005 04:08 PM

Macros (%name%) aren't expanded in step script code. Change the code in the script event to

Function vbld_StepDone()
fname = Application.ExpandMacrosAndScript("%PROJDIR%\F6TesTDotNetPort.root\F6TesTDotNetPort\% BUILD_HISTORY_LOG%")
If vbld_FSO.FileExists(fname) Then
Builder.LogMessage vbld_GetFileContents(fname)
End If
End Function


See http://www.visualbuild.com/Manual/?scripteditor.htm for more details.

dprice 01-20-2005 04:25 PM

That was it! Thanks for all the help.
Derek


All times are GMT -5. The time now is 02:12 PM.


Copyright © 1999-2023 Kinook Software, Inc.