【问题标题】:Team Foundation Server: How to get project's latest build number from command line?Team Foundation Server:如何从命令行获取项目的最新版本号?
【发布时间】:2011-07-20 22:11:46
【问题描述】:

我想使用 tf.exe 命令行实用程序,我希望它输出最新的版本号。 (所以输出将是:例如'159')

这可能吗?

【问题讨论】:

    标签: command-line tfs


    【解决方案1】:

    TFS sux :> 我也有同样的问题。我想出了一个解决方案:

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

    获取最新的变更集编号:

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

    grep 和 gawk 位于:http://unxutils.sourceforge.net/ 这将获取属性后指定的文件/文件夹的版本。

    【讨论】:

      猜你喜欢
      • 2010-12-22
      • 2015-11-02
      • 1970-01-01
      • 2014-10-28
      • 1970-01-01
      • 2020-05-01
      • 2019-06-25
      • 2014-11-13
      • 2013-01-19
      相关资源
      最近更新 更多