有没有一种方法可以基于分支TAG获取特定于Blob的版本?

时间:2019-01-23 16:55:38

标签: git powershell azure-devops-rest-api

我需要使用wpf .Net项目的编译版本生成.zip。但是我需要它,编译只包含已更改的已编译对象,而不是所有文件。

我正在Azure DevOps CD管道中使用PowerShell任务。然后,我使用Azure DevOps Rest API在分支的特定TAG中获取文件的最新版本。

1 个答案:

答案 0 :(得分:0)

您将要使用Git Items API.

示例:

对于仓库中带有此标签的文件:

enter image description here

您将像这样进行API调用:

https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repo}/items?path=temp.txt&versionDescriptor.versionType=tag&versionDescriptor.version=v1.0.0&download=true
相关问题