PDA

View Full Version : Capture particular step's output


grusu
05-11-2004, 07:19 PM
Is it possible to capture a particular step's output and use that output later in the build? Perhapsh using vbld_StepDone()?

Specifically, I am running a VSS History and would like to attach that output as a separate file to an email that also contains the entire build log already.

kinook
05-12-2004, 07:35 AM
Sure. The step's output is available in the LASTSTEP_OUTPUT system macro and is populated by the time the vbld_StepDone event fires. To write it to a file for attaching to a mail message, you could use something like this

vbld_FSO().CreateTextFile("c:\history.txt").Write Application.ExpandMacros("%LASTSTEP_OUTPUT%")

Or to store in a temporary macro for use later in the build:

Application.Macros(vbldMacroTemporary).Add "HISTORY_OUTPUT", Application.Macros(vbldMacroSystem)("LASTSTEP_OUTPUT")