开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜