在ccnet生成标签之前运行msbuild任务

时间:2012-08-23 18:52:40

标签: msbuild continuous-integration build-process cruisecontrol.net

ccnet操作的确切顺序(取自here):

   1) Wait for the triggers to awaken.
   2) Ask the source control system for a list of the modifications since the last build.
   3) If any modifications were found or if the triggers said "force the build":
           3.1) Generate a label for the build.
           3.2) Run the prebuild tasks in the order specified, failing the build in case of error.
           3.3) Get the source code from the source control system.
           3.4) Run the build tasks in the order specified, failing the build in case of error.
           3.5) If the repository should be labeled:
                   3.5.1) Let the source control system apply the label.
           3.6) Run the publisher tasks.
   4) Go to 1.

在ccnet中执行步骤3.1之前,有没有办法运行一些msbuild任务。

问题陈述

我正在使用“fileLabeller”来显示ccnet标签中文件的内容。如果文件存在,这很好用。但是让我们说文件不存在,然后我想调用一个msbuild任务来创建这个文件并设置一些虚拟文本。

我在prebuild事件中调用了这个msbuild任务,但令我失望的是,在prebuild之前发生了标签生成,这无法解决。

有没有办法在标签生成发生之前调用此msbuild任务?

1 个答案:

答案 0 :(得分:1)

Cruisecontrol.net会将所有输出记录到具有特定标签的文件中。这意味着必须在其他任何事情发生之前确定标签。 如果需要运行Msbuild来构建标签,则可能需要编写自己的贴标机。