开发者

Team Foundation Server: How to get project's latest build number from command line?

开发者 https://www.devze.com 2023-03-11 23:19 出处:网络
I want to use to tf.exe command line utility and I want it 开发者_运维知识库to output the latest build revision number. (So output would be: \'159\' for example)

I want to use to tf.exe command line utility and I want it 开发者_运维知识库to output the latest build revision number. (So output would be: '159' for example)

Is this possible?


Well TFS sux :> and I have the same problem. One solution that I came up with this:

tf properties . | grep "Server information" -A 3  | grep Changeset | gawk 'BEGIN {FS = ":"};{ sub(/^[ \t]+/, "",$2); print $2}'

to get the latest changeset number:

tf changeset /latest /noprompt | grep Changeset | gawk 'BEGIN {FS = ":"};{ sub(/^[ \t]+/, "",$2); print $2}'

grep and gawk are available at: http://unxutils.sourceforge.net/ this gets the version of the file/folder specified after properties.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号