开发者

MSBuild: get previous version from msbuild script

开发者 https://www.devze.com 2023-04-12 14:20 出处:网络
Is there a posible to get previous ve开发者_运维百科rsion of code in TFS Build script? I need to get curren version of config file and version from previous check-in, compare them, check if some files

Is there a posible to get previous ve开发者_运维百科rsion of code in TFS Build script? I need to get curren version of config file and version from previous check-in, compare them, check if some files in other folders have the same changes and save the results to log.


We have a similar situation, where we need to get data from a file before getting the latest version. I don't know how much of this is applicable to you, but here's how we do it:

  1. Since we're using CruiseControl.Net for build management, we turn off the autogetsource control in our configurations.
  2. We have built a MSBuild Custom Task (if it's a fairly simple task, you can do it in-line) that retrieves the information we require prior to Get Latest.
  3. "Manually" perform the tf get operation (as an MSBuild task)
  4. Re-run our custom task to retrieve the new information, and act upon differences (for example, use as condition for later tasks)

Both in our case and yours I guess that a method for retrieving/comparing with the "previous" version of an item would have been preferred, but I was stumped there; I couldn't find any relatively easy way to retrieve the previous change set for an item. If anyone has any good ideas there, I'd like to hear these as well :).

0

精彩评论

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

关注公众号