更改 Cruisecontrol.net 中 DVCS 的操作流程?

发布于 2024-10-07 17:33:29 字数 355 浏览 0 评论 0原文

CruiseControl.NET操作流程,详见CCNet操作流程 常见问题解答,首先生成标签对于集中式 VCS 来说有一定意义,但对于 DVCS 来说意义不大。使用 DVCS,最好获取源代码后生成标签,因为标签可能需要源本身(例如,Mercurial 中的 .hgtags 文件或用于计算版本和内部版本号的其他本地源文件)。

有谁在获得源代码后找到了运行 CCNet 贴标机的方法吗?

The CruiseControl.NET operation flow, documented in the Operation flow of CCNet FAQ, where the label is generated first makes some sense for a centralized VCS but not so much for a DVCS. With a DVCS, it would be better to generate the label after getting the source because the source itself might be needed for the label (e.g., the .hgtags file in Mercurial or other local source files used to compute version and build numbers).

Has anyone figured out a way to run the CCNet labeller after getting the source?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拿命拼未来 2024-10-14 17:33:29

我们不在 CC.NET 中使用 Labeller,但尽管如此,我们的方法可能也适合您:

  • 创建一个单独的项目 MercurialCheckout 来执行
    • Mercurial 结帐
    • 更新构建服务器上的文本文件 triggers/mercurial.txt 的可执行任务
  • 将您的“真实”项目从源代码控制类型 Mercurial 更改为源代码控制类型文件系统,观察触发器/目录

然后您的真实项目包括 Labeller 任务,并且由于 Mercurial 结帐之前已完成,贴标机应该生成“正确”的标签。

亲切的问候
坦率

We don't use the Labeller in CC.NET, but nevertheless, our approach might work for you as well:

  • create a separate project MercurialCheckout that performs
    • Mercurial checkout
    • Executable task that updates a text file triggers/mercurial.txt on the build server
  • change your "real" project from sourcecontrol type mercurial to sourcecontrol type filesystem, watching the triggers/directory

Your real project then includes the Labeller task, and since the Mercurial checkout was done before, the Labeller should generate the "right" label.

Kind regards
Frank

素衣风尘叹 2024-10-14 17:33:29

无法使贴标器任务在源代码控制任务之后执行。但仅当您的标签源数据专门存储在本地工作目录中时才需要这样做。您说您的标签源位于版本控制中,因此您应该使用可以从版本控制中检索它的标签器。

大多数版本控制系统都有一个命令行,允许您从标准输出读取文件内容。 CCNet 贴标机易于编写和部署。您可以采用直接从源获取最新版本信息所需的命令行和参数。

ccnet 贴标机配置示例

 <labeller type="svnLabeller">
   <svn>C:\Program Files (x86)\svn\bin\svn.exe</svn>
   <repository>https://path.to/project</repository>
   <versionInfoPath>/AssemblyInfo.cs</versionInfoPath>
  </labeller>

There's no way to make the labeller task execute after the source control task. But you only need that if your label source data is exclusively stored in the local working directory. You said your label source is in version control, so you should use a labeller than can retrieve it from version control.

Most version control systems have a command-line that will allow you to read the file contents from stdout. CCNet labellers are easy to write and deploy. You can take in the command-line and arguments required to fetch the latest version info directly from the source.

Example ccnet labeller config

 <labeller type="svnLabeller">
   <svn>C:\Program Files (x86)\svn\bin\svn.exe</svn>
   <repository>https://path.to/project</repository>
   <versionInfoPath>/AssemblyInfo.cs</versionInfoPath>
  </labeller>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文