Skip to content

Commit

Permalink
Fix OptProf insertions
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Aug 30, 2021
1 parent 29cc43c commit 4c92741
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions azure-pipelines/OptProf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ stages:
displayName: Insert VS Payload
inputs:
SkipCreatePR: true
CustomScriptExecutionCommand: src\VSSDK\NuGet\AllowUnstablePackages.ps1
- task: benjhuser.tfs-extensions-build-tasks.trigger-build-task.TriggerBuild@3
displayName: Trigger a new build of DD-CB-PR
inputs:
Expand Down
5 changes: 1 addition & 4 deletions azure-pipelines/variables/InsertConfigValues.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ if ($dirsToSearch) {
if ($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") {
$id = $Matches[1]
$version = $Matches[2]
# Avoid inserting analyzers in an optprof run.
if ($env:OPTPROF -ne 'true' -or $_.Name -notlike '*Analyzers*') {
$icv += "$id=$version"
}
$icv += "$id=$version"
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions azure-pipelines/variables/InsertPropsValues.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ $BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..\bin\Packages\$env:
$dirsToSearch = "$BinPath\NuGet\*.nupkg" |? { Test-Path $_ }
$icv=@()

# Avoid updating the .props world for an optprof run.
# This avoids analyzer updates that are unrelated and can cause build breaks
# as well as breaks in servicing branches when we insert a PublicRelease=false unstable package version.
if ($dirsToSearch -and !$env:OPTPROF) {
if ($dirsToSearch) {
Get-ChildItem -Path $dirsToSearch |% {
if ($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") {
$id = $Matches[1]
Expand Down

0 comments on commit 4c92741

Please sign in to comment.