有没有办法根据分支 TAG 获取 blob 特定版本?

Is there a way to get a blob specific version based on the branch TAG?

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

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

您将要使用 Git Items API.

示例:

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

您可以这样调用 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