Skip to content

Commit baa7fa9

Browse files
authored
re-enabling hard links (#9862)
1 parent c7ec890 commit baa7fa9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

build/build-extensions.ps1

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,6 @@ function CreateSiteExtensions() {
226226
# This goes in the root dir
227227
Copy-Item $rootDir\src\WebJobs.Script.WebHost\extension.xml $siteExtensionPath > $null
228228

229-
#This needs to be removed post Ant 99 as it's a temporary workaround
230-
New-Item "$siteExtensionPath\$extensionVersion.hardlinksCreated" > $null
231-
232229
Write-Host "Done copying. Elapsed: $($stopwatch.Elapsed)"
233230
Write-Host "======================================"
234231
Write-Host ""
@@ -241,18 +238,25 @@ function CreateSiteExtensions() {
241238
Write-Host
242239

243240
$zipOutput = "$buildOutput\SiteExtension"
241+
$hashesForHardLinksPath = "$siteExtensionPath\$extensionVersion\$hashesForHardlinksFile"
244242
New-Item -Itemtype directory -path $zipOutput -Force > $null
245243
if ($minorVersionPrefix -eq "10") {
246244
ZipContent $siteExtensionPath "$zipOutput\Functions.$extensionVersion$runtimeSuffix.zip"
247245
} elseif ($minorVersionPrefix -eq "8") {
246+
# Only the "Functions" site extension supports hard links
247+
Write-Host "Removing $hashesForHardLinksPath before zipping."
248+
Remove-Item -Force "$hashesForHardLinksPath" -ErrorAction Stop
248249
# The .NET 8 host doesn't require any workers. Doing this to save space.
249-
Write-Host "Removing workers."
250+
Write-Host "Removing workers before zipping."
250251
Remove-Item -Recurse -Force "$siteExtensionPath\$extensionVersion$runtimeSuffix\workers" -ErrorAction Stop
251252
# The host requires that this folder exists, even if it's empty
252-
New-Item -Itemtype directory -path $siteExtensionPath\$extensionVersion$runtimeSuffix\workers
253+
New-Item -Itemtype directory -path $siteExtensionPath\$extensionVersion$runtimeSuffix\workers > $null
253254
Write-Host
254255
ZipContent $siteExtensionPath "$zipOutput\FunctionsInProc8.$extensionVersion$runtimeSuffix.zip"
255256
} elseif ($minorVersionPrefix -eq "6") {
257+
# Only the "Functions" site extension supports hard links
258+
Write-Host "Removing $hashesForHardLinksPath before zipping."
259+
Remove-Item -Force "$hashesForHardLinksPath" -ErrorAction Stop
256260
ZipContent $siteExtensionPath "$zipOutput\FunctionsInProc.$extensionVersion$runtimeSuffix.zip"
257261
}
258262

0 commit comments

Comments
 (0)