Skip to content
代码片段 群组 项目
提交 98525da0 编辑于 作者: Pranav K's avatar Pranav K
浏览文件

Use the right set of env variables for determining commit hash

上级 aa25401a
No related branches found
No related tags found
无相关合并请求
...@@ -183,11 +183,12 @@ ...@@ -183,11 +183,12 @@
<PropertyGroup> <PropertyGroup>
<!-- <!--
Attempt to read environment variables set up by the CI's VCS Root if available. Attempt to read environment variables set up by the CI's VCS Root if available.
* vcsroot.<RepositoryName>.url gives us the clone URL for a repository * BUILD_VCS_URL_<RepositoryName> gives us the clone URL for a repository
* build.vcs.number.<RepositoryName> gives us the commit hash for a repository. * BUILD_VCS_NUMBER_<RepositoryName> gives us the commit hash for a repository.
--> -->
<_CloneUrl>$([System.Environment]::GetEnvironmentVariable("vcsroot.%(Repository.Identity).url"))</_CloneUrl> <_RepositoryName>$([System.String]::new('%(Repository.Identity)').Replace('.', '_'))</_RepositoryName>
<_CommitHash>$([System.Environment]::GetEnvironmentVariable("build.vcs.number.%(Repository.Identity)"))</_CommitHash> <_CloneUrl>$([System.Environment]::GetEnvironmentVariable("BUILD_VCS_URL_$(_RepositoryName)"))</_CloneUrl>
<_CommitHash>$([System.Environment]::GetEnvironmentVariable("BUILD_VCS_NUMBER_$(_RepositoryName)"))</_CommitHash>
</PropertyGroup> </PropertyGroup>
<Warning Text="%(Repository.Identity) has not been cloned." <Warning Text="%(Repository.Identity) has not been cloned."
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册