Skip to content

Commit

Permalink
Fix update versions logic (dotnet/coreclr#26768)
Browse files Browse the repository at this point in the history
* Fix update versions logic

After dotnet/coreclr#26108, this was broken
because the Tools.proj was never restored on the agent running the
finalize-publish job. This fixes the script to do a restore, and adds
a missing import.

* Remove UpdatePublishedVersions.ps1 and add darc dependency


Commit migrated from dotnet/coreclr@9be00be
  • Loading branch information
sbomer committed Sep 18, 2019
1 parent b968a54 commit d82205e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 41 deletions.
19 changes: 10 additions & 9 deletions eng/finalize-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@ jobs:
Write-Host "For Build.SourceBranch $branch, FullBranchName is $branchName"
Write-Host "##vso[task.setvariable variable=FullBranchName;]$branchName"
ls -R ${{ parameters.artifactsDir }}/nuget/*.nupkg
$(Build.SourcesDirectory)/UpdatePublishedVersions.ps1 `
-gitHubUser ${{ parameters.gitHubUser }} `
-gitHubEmail ${{ parameters.gitHubEmail }} `
-gitHubAuthToken ${{ parameters.gitHubAuthToken }} `
-versionsRepoOwner ${{ parameters.versionsRepoOwner }} `
-versionsRepo ${{ parameters.versionsRepo }} `
-versionsRepoPath build-info/dotnet/coreclr/$branchName `
-nupkgPath ${{ parameters.artifactsDir }}/nuget/*.nupkg
& $(Build.SourcesDirectory)/eng/common/build.ps1 -restore -build -ci `
-projects "$(Build.SourcesDirectory)/eng/updateversions.proj" `
/p:GitHubUser="${{ parameters.gitHubUser }}" `
/p:GitHubEmail="${{ parameters.gitHubEmail }}" `
/p:GitHubAuthToken="${{ parameters.gitHubAuthToken }}" `
/p:VersionsRepoOwner="${{ parameters.versionsRepoOwner }}" `
/p:VersionsRepo="${{ parameters.versionsRepo }}" `
/p:VersionsRepoPath="build-info/dotnet/coreclr/$branchName" `
/p:ShippedNuGetPackageGlobPath="${{ parameters.artifactsDir }}/nuget/*.nupkg"
displayName: Run UpdatePublishedVersions.ps1
displayName: Update dotnet/versions
- task: CopyFiles@2
displayName: Copy Files to $(Build.StagingDirectory)\BuildLogs
Expand Down
6 changes: 5 additions & 1 deletion eng/updateversions.proj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.versiontools.tasks\$(MicrosoftDotNetVersionToolsTasksPackageVersion)\build\Microsoft.DotNet.VersionTools.Tasks.targets" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.versiontools.tasks\$(MicrosoftDotNetVersionToolsTasksVersion)\build\Microsoft.DotNet.VersionTools.Tasks.props" />

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.versiontools.tasks\$(MicrosoftDotNetVersionToolsTasksVersion)\build\Microsoft.DotNet.VersionTools.Tasks.targets" />

<Target Name="Build" DependsOnTargets="UpdatePublishedVersions" />

</Project>
31 changes: 0 additions & 31 deletions src/coreclr/UpdatePublishedVersions.ps1

This file was deleted.

0 comments on commit d82205e

Please sign in to comment.