Skip to content

Commit 617888e

Browse files
committed
Refresh generated scripts.
1 parent 128ebdb commit 617888e

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

DockerBuild.ps1

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if (-not $KeepEnv)
109109
}
110110
if (-not $env:GIT_USER_NAME)
111111
{
112-
$env:GIT_USER_EMAIL = 'teamcity'
112+
$env:GIT_USER_NAME = 'teamcity'
113113
}
114114
}
115115

@@ -160,6 +160,27 @@ if (-not $NoNuGetCache)
160160
# We must add a MountPoint anyway so the directory is created in the container.
161161
$MountPoints += "c:\packages"
162162

163+
# Discover symbolic links in source-dependencies and add their targets to mount points
164+
$sourceDependenciesDir = Join-Path $SourceDirName "source-dependencies"
165+
if (Test-Path $sourceDependenciesDir)
166+
{
167+
$symbolicLinks = Get-ChildItem -Path $sourceDependenciesDir -Force | Where-Object { $_.LinkType -eq 'SymbolicLink' }
168+
169+
foreach ($link in $symbolicLinks)
170+
{
171+
$targetPath = $link.Target
172+
if (-not [string]::IsNullOrEmpty($targetPath) -and (Test-Path $targetPath))
173+
{
174+
Write-Host "Found symbolic link '$($link.Name)' -> '$targetPath'" -ForegroundColor Cyan
175+
$volumeMappings += @("-v", "${targetPath}:${targetPath}:ro")
176+
$MountPoints += $targetPath
177+
}
178+
else
179+
{
180+
Write-Host "Warning: Symbolic link '$($link.Name)' target '$targetPath' does not exist or is invalid" -ForegroundColor Yellow
181+
}
182+
}
183+
}
163184

164185
# Execute auto-generated DockerMounts.g.ps1 script to add more directory mounts.
165186
$dockerMountsScript = Join-Path $EngPath 'DockerMounts.g.ps1'

0 commit comments

Comments
 (0)