Skip to content

Commit d6acdea

Browse files
use nuspec
1 parent 3dbaae4 commit d6acdea

6 files changed

+48
-35
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!--
2+
Copyright (c) Microsoft. All rights reserved.
3+
Licensed under the MIT license. See LICENSE file in the project root for full license information.
4+
-->
5+
<Project Sdk="Microsoft.NET.Sdk">
6+
<PropertyGroup>
7+
<TargetFramework>netcoreapp2.1</TargetFramework>
8+
<NuspecFile>Microsoft.Azure.Functions.PowerShellWorker.nuspec</NuspecFile>
9+
<NuspecProperties>configuration=$(Configuration);targetFramework=$(TargetFramework)</NuspecProperties>
10+
<NoBuild>true</NoBuild>
11+
<IncludeBuildOutput>false</IncludeBuildOutput>
12+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
13+
<NoWarn>NU5100</NoWarn>
14+
</PropertyGroup>
15+
</Project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright (c) Microsoft. All rights reserved.
4+
Licensed under the MIT license. See LICENSE file in the project root for full license information.
5+
-->
6+
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
7+
<metadata>
8+
<id>Microsoft.Azure.Functions.PowerShellWorker</id>
9+
<version>0.1.0</version>
10+
<title>Azure Function PowerShell Language Worker</title>
11+
<authors>Microsoft</authors>
12+
<owners>Microsoft</owners>
13+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14+
<licenseUrl>https://github.com/Azure/azure-functions-powershell-worker/blob/dev/LICENSE</licenseUrl>
15+
<projectUrl>https://github.com/Azure/azure-functions-powershell-worker</projectUrl>
16+
<iconUrl>https://github.com/PowerShell/PowerShell/blob/master/assets/Powershell_64.png</iconUrl>
17+
<description>The Azure Function PowerShell Language Worker allows users to write Azure Function Apps using PowerShell. It leverages the PowerShell Core SDK.</description>
18+
<releaseNotes># 0.1.0
19+
20+
Initial Release</releaseNotes>
21+
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
22+
<tags>azure,functions,powershell,worker</tags>
23+
<contentFiles>
24+
<files include="**/*" buildAction="None" copyToOutput="true" flatten="false"/>
25+
</contentFiles>
26+
</metadata>
27+
<files>
28+
<file src="../src/bin/$configuration$/$targetFramework$/publish/**/*" target="contentFiles/any/any/workers/powershell" />
29+
</files>
30+
</package>

src/Microsoft.Azure.Functions.PowerShellWorker.Package.props

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/Microsoft.Azure.Functions.PowerShellWorker.csproj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@ Copyright (c) Microsoft. All rights reserved.
33
Licensed under the MIT license. See LICENSE file in the project root for full license information.
44
-->
55
<Project Sdk="Microsoft.NET.Sdk">
6-
<Import Project="Microsoft.Azure.Functions.PowerShellWorker.Package.props" />
76
<PropertyGroup>
87
<OutputType>Exe</OutputType>
98
<TargetFramework>netcoreapp2.1</TargetFramework>
109
<Product>Azure Function PowerShell Language Worker</Product>
10+
<AssemblyName>Microsoft.Azure.Functions.PowerShellWorker</AssemblyName>
1111

1212
<LangVersion>Latest</LangVersion>
1313
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1414
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
1515
<GenerateDocumentationFile>true</GenerateDocumentationFile>
16-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
17-
<IncludeBuildOutput>true</IncludeBuildOutput>
1816
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
1917
<NeutralLanguage>en-US</NeutralLanguage>
2018
</PropertyGroup>
@@ -27,10 +25,6 @@ Licensed under the MIT license. See LICENSE file in the project root for full li
2725
<PackageReference Include="Google.Protobuf" Version="3.6.1" />
2826
</ItemGroup>
2927

30-
<!-- Copy Content files to the language worker's directory -->
31-
<PropertyGroup>
32-
<ContentTargetFolders>contentFiles\any\any\workers\powershell</ContentTargetFolders>
33-
</PropertyGroup>
3428
<ItemGroup>
3529
<Content Include="worker.config.json" PackageCopyToOutput="true">
3630
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -40,5 +34,4 @@ Licensed under the MIT license. See LICENSE file in the project root for full li
4034
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4135
</Content>
4236
</ItemGroup>
43-
4437
</Project>

src/PowerShell/PowerShellManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ internal void InitializeRunspace()
5656
_pwsh.AddScript($"using namespace {typeof(HttpResponseContext).Namespace}").InvokeAndClearCommands();
5757

5858
// Set the PSModulePath
59-
Environment.SetEnvironmentVariable("PSModulePath", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "workers", "powershell", "Modules"));
59+
Environment.SetEnvironmentVariable("PSModulePath", Path.Join(AppDomain.CurrentDomain.BaseDirectory, "Modules"));
6060
}
6161

6262
internal Hashtable InvokeFunction(

src/worker.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"language":"powershell",
44
"extensions":[".ps1"],
55
"defaultExecutablePath":"dotnet",
6-
"defaultWorkerPath":"../../Microsoft.Azure.Functions.PowerShellWorker.dll"
6+
"defaultWorkerPath":"Microsoft.Azure.Functions.PowerShellWorker.dll"
77
}
88
}

0 commit comments

Comments
 (0)