Skip to content

Commit 408c8bf

Browse files
authored
Move PS6 worker to a version-specific subfolder (#393)
* Update NuGet files target path * Update worker.config.json to point to the version-specific folder * Follow the new folder structure in E2E test deployment
1 parent 950d326 commit 408c8bf

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

package/Microsoft.Azure.Functions.PowerShellWorker.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Licensed under the MIT license. See LICENSE file in the project root for full li
2626
</contentFiles>
2727
</metadata>
2828
<files>
29-
<file src="..\src\bin\$configuration$\$targetFramework$\publish\**\*" target="contentFiles\any\any\workers\powershell" />
29+
<file src="..\src\bin\$configuration$\$targetFramework$\publish\**\*" target="contentFiles\any\any\workers\powershell\6" />
3030
<file src="..\images\Powershell_black_64.png" target="images\" />
3131
</files>
3232
</package>

src/worker.config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"language":"powershell",
44
"extensions":[".ps1", ".psm1"],
55
"defaultExecutablePath":"dotnet",
6-
"defaultWorkerPath":"Microsoft.Azure.Functions.PowerShellWorker.dll"
6+
"defaultWorkerPath":"%FUNCTIONS_WORKER_RUNTIME_VERSION%/Microsoft.Azure.Functions.PowerShellWorker.dll",
7+
"supportedRuntimeVersions":["6", "7"],
8+
"defaultRuntimeVersion":"6",
9+
"sanitizeRuntimeVersion":"\\d+"
710
}
811
}

test/E2E/Start-E2ETest.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55

66
$FUNC_RUNTIME_VERSION = '3'
7+
$NETCOREAPP_VERSION = '2.1'
8+
$POWERSHELL_VERSION = '6'
79

810
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant()
911
if ($IsWindows) {
@@ -43,11 +45,13 @@ Write-Host "Copying azure-functions-powershell-worker to Functions Host workers
4345

4446
$configuration = if ($env:CONFIGURATION) { $env:CONFIGURATION } else { 'Debug' }
4547
Remove-Item -Recurse -Force -Path "$FUNC_CLI_DIRECTORY/workers/powershell"
46-
Copy-Item -Recurse -Force "$PSScriptRoot/../../src/bin/$configuration/netcoreapp2.1/publish/" "$FUNC_CLI_DIRECTORY/workers/powershell"
48+
Copy-Item -Recurse -Force "$PSScriptRoot/../../src/bin/$configuration/netcoreapp$NETCOREAPP_VERSION/publish/" "$FUNC_CLI_DIRECTORY/workers/powershell/$POWERSHELL_VERSION"
49+
Copy-Item -Recurse -Force "$PSScriptRoot/../../src/bin/$configuration/netcoreapp$NETCOREAPP_VERSION/publish/worker.config.json" "$FUNC_CLI_DIRECTORY/workers/powershell"
4750

4851
Write-Host "Staring Functions Host..."
4952

5053
$Env:FUNCTIONS_WORKER_RUNTIME = "powershell"
54+
$Env:FUNCTIONS_WORKER_RUNTIME_VERSION = $POWERSHELL_VERSION
5155
$Env:AZURE_FUNCTIONS_ENVIRONMENT = "development"
5256
$Env:Path = "$Env:Path$([System.IO.Path]::PathSeparator)$FUNC_CLI_DIRECTORY"
5357
$funcExePath = Join-Path $FUNC_CLI_DIRECTORY $FUNC_EXE_NAME

0 commit comments

Comments
 (0)