Skip to content

Commit

Permalink
Merge 223d9a3 into b6032af
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyanziano committed Jun 24, 2022
2 parents b6032af + 223d9a3 commit 970971d
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion azure-pipelines.yml
Expand Up @@ -9,8 +9,28 @@ jobs:
parallel: "4"
pool:
vmImage: ubuntu-latest

steps:
- powershell: |
# Gin up imitation v1 yarn.lock files to aid Component Governance Detection analysis. The method:
# Find v3 yarn-berry.lock files. From each, generate a yarn.lock file, deleting all occurrences of 'npm:'.
# This allows CG to work with yarn v3.
$find = 'npm:';
$replace = '';
Get-ChildItem -Recurse -Path '**/yarn-berry.lock' | % {
$source = $_.FullName;
$dest = $_.DirectoryName + "/yarn.lock"
Write-Host $source;
Write-Host $dest;
Copy-Item -Path $source -Destination $dest -Force
$content = Get-Content -Raw $dest;
$content -Replace "$find", "$replace" | Set-Content $dest;
'--------------------'; get-content $dest; '====================';
}
displayName: Generate "yarn.lock" files for CG Detection
continueOnError: true
- task: UseDotNet@2
inputs:
packageType: "runtime"
Expand Down

0 comments on commit 970971d

Please sign in to comment.