Skip to content

Commit 37556d2

Browse files
authored
Use SourceBranch vs. SourceBranchName (dotnet/corefx#35413)
* Use SourceBranch vs. SourceBranchName SourceBranchName only evaluates to the last path name of the branch: - 3.0 in release/3.0 We want the full branch, with refs/heads for consistency with the rest of the repos Commit migrated from dotnet/corefx@36167bc
1 parent 98668c4 commit 37556d2

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

eng/pipelines/libraries/publish.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ jobs:
3232
value: ${{ parameters.artifactsDir }}/AssetManifests
3333

3434
steps:
35+
- powershell: |
36+
$prefix = "refs/heads/"
37+
$branch = "$(Build.SourceBranch)"
38+
$branchName = $branch
39+
if ($branchName.StartsWith($prefix))
40+
{
41+
$branchName = $branchName.Substring($prefix.Length)
42+
}
43+
Write-Host "For Build.SourceBranch $branch, FullBranchName is $branchName"
44+
Write-Host "##vso[task.setvariable variable=FullBranchName;]$branchName"
45+
displayName: Find true SourceBranchName
46+
3547
- task: DownloadBuildArtifacts@0
3648
displayName: Download packages to publish
3749
inputs:
@@ -46,7 +58,7 @@ jobs:
4658
/t:PublishPackagesToBlobFeed
4759
/p:ManifestBuildId=$(Build.BuildNumber)
4860
/p:ManifestBuildData=Location=$(_dotnetFeedUrl)
49-
/p:ManifestBranch=$(Build.SourceBranchName)
61+
/p:ManifestBranch=$(Build.SourceBranch)
5062
/p:ManifestCommit=$(Build.SourceVersion)
5163
/p:ManifestRepoUri=$(Build.Repository.Uri)
5264
/p:AccountKey=$(dotnetfeed-storage-access-key-1)
@@ -82,7 +94,7 @@ jobs:
8294
/p:GitHubAuthToken=$(AccessToken-dotnet-build-bot-public-repo)
8395
/p:VersionsRepoOwner=dotnet
8496
/p:VersionsRepo=versions
85-
/p:VersionsRepoPath=build-info/dotnet/corefx/$(Build.SourceBranchName)
97+
/p:VersionsRepoPath=build-info/dotnet/corefx/$(FullBranchName)
8698
/p:ShippedNuGetPackageGlobPath=${{ parameters.artifactsDir }}/packages/*.nupkg
8799
displayName: Update dotnet/versions
88100

0 commit comments

Comments
 (0)