Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continous Build Integration with SourceSafe and Batch Files

I want to create a continuous build integration system for .NET using just Windows batch files and Visual Source Safe.

I've come up with the following batch file so far -

set ssdir=\\xxxx\vss
cd d:\mydir
"C:\Program Files\Microsoft Visual SourceSafe\ss.exe" diff "$/sourcedir" -R -Q > diffout.txt

This will spit out a file containg lines like "SourceSafe files different from local files" when a change has been made.

My challenge is to figure out if those lines are in the file, then do a get and kick off MSBuild if they are. I'd then schedule the batch file to run every 10 minutes or so.

Anyone got any thoughts on how to do that? Or any other ways of doing continuous build integration without downloading a complicated build automation system?

Update: Happy to use cscript or powershell too, though not really familiar with those environments. My main aim is to avoid installing 3rd party software

like image 638
Craig Schwarze Avatar asked Dec 04 '25 21:12

Craig Schwarze


2 Answers

hudson is not a very complicated thing to get running. Even i managed to get it working in a short amount of time.

And while you're at it, replace sourcesafe...

like image 160
Tim Avatar answered Dec 07 '25 14:12

Tim


cmd.exe is a dinosaur. Here's a PowerShell version.

Set-Alias ss 'C:\Program Files\Microsoft Visual SourceSafe\ss.exe'
Set-Alias msbuild 'C:\Windows\Microsoft.Net\Framework64\v3.5\msbuild.exe'

cd d:\mydir

$diffs = ss diff '$/sourcedir' -R -Q

if ($diffs -match 'SourceSafe files different') {
    msbuild blah
}
like image 38
Josh Avatar answered Dec 07 '25 15:12

Josh