Skip to content

Commit bdb8716

Browse files
author
Pavel Purma
committed
Copy to the docker context folder
1 parent c83628f commit bdb8716

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

eng/Stage-EngCommon.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,22 @@ $dockerfiles = Get-ChildItem (Join-Path $repoRoot 'src') -Filter Dockerfile -Fil
1414
}
1515

1616
foreach ($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
}

0 commit comments

Comments
 (0)