CruiseControl.NET and StarTeam

If you are as fortunate as I am, you have had the chance to work with StarTeam and CruiseControl.NET and you may have bumped into a fairly annoying issue.  The StarTeam Source Control Block for CCNet does not have the option to automatically remove files that have been removed from source control.  This is an issue because you will eventually be compiling code that should no longer be in your product.  Of course, it probably won't be too long before your builds start breaking altogether.  So how do you fix this problem?  It's fairly easy to fix this problem using the exec task in Nant along with stcmd.exe from StarTeam.  Just add and call a new task to your Nant build script:

   1:  <target name="removeDeletedStarTeamFiles">
   2:   <echo message="Deleting files that have been removed from Source Control" />
   3:   <exec basedir="."
   4:    program="${starteam}\stcmd.exe"
   5:    commandline=
'delete-local -filter "N" -rp "${path::get-full-path(root)}" -is -q -p "u:p@svr:port/proj"'
   6:    workingdir="."
   7:    failonerror="true" />
   8:  </target>

Comments have been closed on this topic.