更改 Cruisecontrol.net 中 DVCS 的操作流程?
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们不在 CC.NET 中使用 Labeller,但尽管如此,我们的方法可能也适合您:
然后您的真实项目包括 Labeller 任务,并且由于 Mercurial 结帐之前已完成,贴标机应该生成“正确”的标签。
亲切的问候
坦率
We don't use the Labeller in CC.NET, but nevertheless, our approach might work for you as well:
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
无法使贴标器任务在源代码控制任务之后执行。但仅当您的标签源数据专门存储在本地工作目录中时才需要这样做。您说您的标签源位于版本控制中,因此您应该使用可以从版本控制中检索它的标签器。
大多数版本控制系统都有一个命令行,允许您从标准输出读取文件内容。 CCNet 贴标机易于编写和部署。您可以采用直接从源获取最新版本信息所需的命令行和参数。
ccnet 贴标机配置示例
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