与 SourceSafe 和批处理文件的持续构建集成
我想仅使用 Windows 批处理文件和 Visual Source Safe 为 .NET 创建一个持续构建集成系统。
到目前为止,我已经提出了以下批处理文件 -
set ssdir=\\xxxx\vss
cd d:\mydir
"C:\Program Files\Microsoft Visual SourceSafe\ss.exe" diff "$/sourcedir" -R -Q > diffout.txt
当进行更改时,这将吐出一个包含诸如“SourceSafe 文件与本地文件不同”之类的行的文件。
我的挑战是弄清楚这些行是否在文件中,然后执行 get 并启动 MSBuild(如果有)。然后我安排批处理文件每 10 分钟左右运行一次。
有人对如何做到这一点有任何想法吗?或者有任何其他方法可以在不下载复杂的构建自动化系统的情况下进行持续构建集成?
更新:也很高兴使用 cscript 或 powershell,尽管不太熟悉这些环境。我的主要目标是避免安装第三方软件
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
hudson 运行起来并不是一件非常复杂的事情。即使我也设法在短时间内让它工作。
当你这样做时,替换sourcesafe...
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...
cmd.exe 是一只恐龙。这是 PowerShell 版本。
cmd.exe is a dinosaur. Here's a PowerShell version.
自己编写是一种很好的学习方式,但是我建议像 Maven 和巡航控制这样的东西运行起来非常简单。
但是,如果非常热衷于编写自己的内容,我会编写 filewatcher 用于监视 VSS Shadow 中的文件文件夹,然后启动 MSBUILD。
Writing your own is a good way to learn but I'd suggest that things like maven and cruise control are very simple to get running.
However if dead keen on writing your own, I'd write a filewatcher that watches the files in the VSS Shadow Folders and then kicks off MSBUILD.