How to run a task before updating the source files?

I need to run a task in CruiseControl.NET before checking for a change in the source control. I mean, this task should be the first that CruiseControl will always do. I see <prebuild>in cc.config, but it is designed to run tasks before building a solution, so this is not quite what I need.

+3
source share
2 answers

Use a batch file as a proxy for a version control utility, for example. svn.bat:

echo do stuff
"c:\program files\Subversion\svn.exe" %*

Use the executable to point to the bach file.

+2
source

Prebuild , . , . , :

<cb:define subversionpath="c:\Program Files\Subversion\bin\svn.exe"
/>

 <cb:define name="svn50">
<executable>$(subversionpath)</executable>
<workingDirectory>D:\Projects\B50\Source</workingDirectory>
<trunkUrl>svn://machineName/branches/B_50/Source</trunkUrl>
<autoGetSource>true</autoGetSource>
</cb:define>

 <project name="StreamlineCheckBuild" queue="B50">
<triggers>
  <intervalTrigger seconds="180" />
</triggers>
<sourcecontrol type="svn">
  <cb:svn50/>
  <deleteObstructions>true</deleteObstructions>
  <forceUpdate>true</forceUpdate>
</sourcecontrol>
<prebuild>
  <exec>
    <executable>$(subversionpath)</executable>
    <buildArgs>cleanup</buildArgs>
    <baseDirectory>D:\Projects\B50</baseDirectory>
  </exec>
</prebuild>
<tasks>
...
</tasks>
</cruisecontrol>
+5

Source: https://habr.com/ru/post/1737555/


All Articles