在 TFS Builds 中 BuildID Macro 是如何递增的,我怎样才能让它像 ++ 一样? [英] How is BuildID Macro is incremented in TFS Builds, and how can I make it go like ++?

查看:22
本文介绍了在 TFS Builds 中 BuildID Macro 是如何递增的,我怎样才能让它像 ++ 一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个通过 TFS 服务器编译的项目.构建编号格式(在构建设置的进程选项卡中)定义为 $(BuildDefinitionName)_$(BuildID).我无法弄清楚 $(BuildID) 是如何递增的.如果我排队,比如说两个构建,在同一小时内,它通常会增加一个,但并非总是如此.

I'm working on a project being compiled over a TFS server. The build number format (in the process tab of the build settings) is defined as $(BuildDefinitionName)_$(BuildID). What I can't figure out is how the $(BuildID) is incremented. If I queue, say two builds, within the same hour, it will usually increase by one, but not always.

如果距离上次构建已经过去了大约一周,它可能会增加 20 或 40.我还没有想出任何模式.

If it's been ~one week since the last build it might increment by 20 or 40. I haven't figured any pattern yet.

但我真正的问题是:如何让它在每次构建时增加 1.

But my real question would be : how can I make it increase by one at each build.

推荐答案

$(BuildID) 用于整个团队项目集合.我假设您的收藏中有多个团队项目.

$(BuildID) is used for the whole team project collection. I assume you have multiple team projects in your collection.

因此,每次触发的构建都会将此 ID 加一(它基本上是 TFS 数据库中相应构建的主键).

So every build triggerd increments this ID by one (It's basically the primary key of the respective build in the TFS DB).

这篇关于在 TFS Builds 中 BuildID Macro 是如何递增的,我怎样才能让它像 ++ 一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆