TFS 2010 Team Build Revision $(Rev:.r) 存储在哪里? [英] Where is TFS 2010 Team Build Revision $(Rev:.r) Stored?

查看:32
本文介绍了TFS 2010 Team Build Revision $(Rev:.r) 存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TFS 2010 公开了内部版本号格式"属性,其中包含 $(BuildNumberDefinitionName) 和 $(Rev:.r) 变量(除其他外).我的问题的两个半部分:

  1. 这里可以使用的所有可用变量是什么?

  2. $(Rev:.r) 的值从何而来(存储在哪里)?

    一个.可以重置或更改吗?

解决方案

http://www.richardmaxwell.name/blog/2011/5/5/force-tfs-build-revision-to-a-specifc-value.html

每当您在 TFS 版本中更改版本号时,修订版都会重置为 1,这在大多数情况下都是应该执行的.但有时,您想从修订版 100 开始,可能重新创建已删除的构建定义,或者只是想将旧修订版维护到新分支中.我在一次幸运的事故中发现这是可能的.您必须用硬编码替换动态修订,构建,然后将其改回.出于沮丧,我最终尝试了这个:

内部版本号格式:1.0.0.100

这给了我想要的构建,然后将其改回:

内部版本号格式:1.0.0$(Rev:.r)

这获取了我的最后一个值,从 1.0.0.101 开始未来构建,而不是增加它使用的最后一个版本 1.0.0.2.因此,我可以跳过版本 1 到 99,并从版本号 100 开始.

TFS 2010 exposes a "Build Number Format" property, which contains $(BuildNumberDefinitionName) and $(Rev:.r) variables (among other things). Two and a half parts to my question:

  1. What are all the available variables that can be used here?

  2. Where does the value for $(Rev:.r) come from (where is it stored)?

    a. Can it be reset or changed?

解决方案

http://www.richardmaxwell.name/blog/2011/5/5/force-tfs-build-revision-to-a-specifc-value.html

Anytime you change your Build Number in a TFS build, the revision resets to 1, which is what it should do, most of the time. But sometimes, you want to start at revision 100, maybe recreating a deleted build definition, or just wanting to maintain the old revision into a new branch. It took me a lucky accident to discover how this is possible. You must replace the dynamic revision with a hard coded one, build, and then change it back. Out of frustration I eventually tried this:

Build Number Format: 1.0.0.100

This gave me the build I wanted, and then changed it back to this:

Build Number Format: 1.0.0$(Rev:.r)

This picked up my last value, starting future build at 1.0.0.101, instead of incrementing the last version that it had used, 1.0.0.2. So I was able to skip builds 1 through 99 and start at revision 100 in my build number.

这篇关于TFS 2010 Team Build Revision $(Rev:.r) 存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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