Skip to content

Commit

Permalink
Merge branch 'main' into microbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Dec 3, 2021
2 parents 848f979 + 81634e3 commit 8b1c1f4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- template: install-dependencies.yml

- powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud'
- powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud -c'
displayName: Set build number

- ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines/publish-codecoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ steps:
- powershell: |
dotnet tool install --tool-path obj dotnet-reportgenerator-globaltool --version 4.8.5 --configfile azure-pipelines/justnugetorg.nuget.config
Copy-Item -Recurse $(Pipeline.Workspace)/coverageResults-Windows/obj/* $(System.DefaultWorkingDirectory)/obj
Write-Host "Substituting {reporoot} with $(System.DefaultWorkingDirectory)"
$reports = Get-ChildItem -Recurse "$(Pipeline.Workspace)/coverage.*cobertura.xml"
Write-Host 'Substituting {reporoot} with $(System.DefaultWorkingDirectory)'
$reports = Get-ChildItem -Recurse '$(Pipeline.Workspace)/coverage.*cobertura.xml'
$reports |% {
$content = Get-Content -Path $_ |% { $_.Replace("{reporoot}", "$(System.DefaultWorkingDirectory)") }
$content = Get-Content -Path $_ |% { $_.Replace('{reporoot}', '$(System.DefaultWorkingDirectory)') }
Set-Content -Path $_ -Value $content -Encoding UTF8
}
$Inputs = [string]::join(';', ($reports |% { Resolve-Path -relative $_ }))
Expand Down
10 changes: 5 additions & 5 deletions init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
.PARAMETER AccessToken
An optional access token for authenticating to Azure Artifacts authenticated feeds.
#>
[CmdletBinding(SupportsShouldProcess=$true)]
[CmdletBinding(SupportsShouldProcess = $true)]
Param (
[ValidateSet('repo','user','machine')]
[string]$InstallLocality='user',
[ValidateSet('repo', 'user', 'machine')]
[string]$InstallLocality = 'user',
[Parameter()]
[switch]$NoPrerequisites,
[Parameter()]
Expand Down Expand Up @@ -87,8 +87,8 @@ if (!$NoPrerequisites) {
}

# Workaround nuget credential provider bug that causes very unreliable package restores on Azure Pipelines
$env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20
$env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
$env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
$env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20

Push-Location $PSScriptRoot
try {
Expand Down
6 changes: 6 additions & 0 deletions src/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Runtime.InteropServices;

[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
4 changes: 4 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<Project>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, Directory.Build.targets))\Directory.Build.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, Directory.Build.targets))' != '' " />
</Project>
4 changes: 4 additions & 0 deletions tools/Install-DotNetSdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ $DotNetInstallScriptRoot = Resolve-Path $DotNetInstallScriptRoot
$sdkVersion = & "$PSScriptRoot/../azure-pipelines/variables/DotNetSdkVersion.ps1"

$arch = [System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture
if (!$arch) { # Windows Powershell leaves this blank
$arch = 'x64'
if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { $arch = 'ARM64' }
}

# Search for all .NET Core runtime versions referenced from MSBuild projects and arrange to install them.
$runtimeVersions = @()
Expand Down

0 comments on commit 8b1c1f4

Please sign in to comment.