File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,16 +14,22 @@ $dockerfiles = Get-ChildItem (Join-Path $repoRoot 'src') -Filter Dockerfile -Fil
1414 }
1515
1616foreach ($dockerfile in $dockerfiles ) {
17- $engDirectory = Join-Path $dockerfile.Directory.FullName ' eng'
17+ $buildContextDirectory = $dockerfile.Directory.FullName
18+ if ($dockerfile.Directory.Parent.Name -eq ' crossdeps-builder' ) {
19+ $buildContextDirectory = $buildContextDirectory -replace ' ([\\/])crossdeps-builder' , ' ${1}crossdeps'
20+ }
21+
22+ $engDirectory = Join-Path $buildContextDirectory ' eng'
1823 $destination = Join-Path $engDirectory ' common'
1924
2025 if (Test-Path - LiteralPath $destination ) {
2126 Remove-Item - LiteralPath $destination - Recurse - Force
2227 }
2328
2429 if (-not $Clean ) {
30+ New-Item - Path $buildContextDirectory - ItemType Directory - Force | Out-Null
2531 New-Item - Path $engDirectory - ItemType Directory - Force | Out-Null
2632 Copy-Item - LiteralPath $source - Destination $engDirectory - Recurse - Force
27- Write-Host " Staged eng/common next to $ ( $dockerfile.FullName ) "
33+ Write-Host " Staged eng/common for $ ( $dockerfile.FullName ) in $destination "
2834 }
2935}
You can’t perform that action at this time.
0 commit comments