Skip to content

Refactor package structure for Azure Functions usage #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions azure-functions-powershell-worker.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8C758288-3909-4CE1-972D-1BE966628D6C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Functions.PowerShell.Worker", "src\Azure.Functions.PowerShell.Worker.csproj", "{939262BA-4823-405E-81CD-436C0B77D524}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.PowerShellWorker", "src\Microsoft.Azure.Functions.PowerShellWorker.csproj", "{939262BA-4823-405E-81CD-436C0B77D524}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{12092936-4F2A-4B40-9AF2-56C840D44FEA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Functions.PowerShell.Worker.Test", "test\Azure.Functions.PowerShell.Worker.Test.csproj", "{535C8DA3-479D-42BF-B1AF-5B03ECAF67A4}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.PowerShellWorker.Test", "test\Microsoft.Azure.Functions.PowerShellWorker.Test.csproj", "{535C8DA3-479D-42BF-B1AF-5B03ECAF67A4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
15 changes: 15 additions & 0 deletions package/Microsoft.Azure.Functions.PowerShellWorker.Package.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
Copyright (c) Microsoft. All rights reserved.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
-->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<NuspecFile>Microsoft.Azure.Functions.PowerShellWorker.nuspec</NuspecFile>
<NuspecProperties>configuration=$(Configuration);targetFramework=$(TargetFramework)</NuspecProperties>
<NoBuild>true</NoBuild>
<IncludeBuildOutput>false</IncludeBuildOutput>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>NU5100</NoWarn>
</PropertyGroup>
</Project>
30 changes: 30 additions & 0 deletions package/Microsoft.Azure.Functions.PowerShellWorker.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) Microsoft. All rights reserved.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
-->
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Microsoft.Azure.Functions.PowerShellWorker</id>
<version>0.1.0</version>
<title>Azure Function PowerShell Language Worker</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/Azure/azure-functions-powershell-worker/blob/dev/LICENSE</licenseUrl>
<projectUrl>https://github.com/Azure/azure-functions-powershell-worker</projectUrl>
<iconUrl>https://github.com/PowerShell/PowerShell/blob/master/assets/Powershell_64.png</iconUrl>
<description>The Azure Function PowerShell Language Worker allows users to write Azure Function Apps using PowerShell. It leverages the PowerShell Core SDK.</description>
<releaseNotes># 0.1.0

Initial Release</releaseNotes>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<tags>azure,functions,powershell,worker</tags>
<contentFiles>
<files include="**/*" buildAction="None" copyToOutput="true" flatten="false"/>
</contentFiles>
</metadata>
<files>
<file src="../src/bin/$configuration$/$targetFramework$/publish/**/*" target="contentFiles/any/any/workers/powershell" />
</files>
</package>
2 changes: 1 addition & 1 deletion src/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

using System.Runtime.CompilerServices;

[assembly:InternalsVisibleTo("Azure.Functions.PowerShell.Worker.Test")]
[assembly:InternalsVisibleTo("Microsoft.Azure.Functions.PowerShellWorker.Test")]

25 changes: 0 additions & 25 deletions src/Azure.Functions.PowerShell.Worker.Package.props

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ Copyright (c) Microsoft. All rights reserved.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
-->
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="Azure.Functions.PowerShell.Worker.Package.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<Product>Azure Function PowerShell Language Worker</Product>
<AssemblyName>Microsoft.Azure.Functions.PowerShellWorker</AssemblyName>

<LangVersion>Latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IncludeBuildOutput>true</IncludeBuildOutput>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
Expand All @@ -35,5 +34,4 @@ Licensed under the MIT license. See LICENSE file in the project root for full li
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@{

# Script module or binary module file associated with this manifest.
RootModule = 'Azure.Functions.PowerShell.Worker.Module.psm1'
RootModule = 'Microsoft.Azure.Functions.PowerShellWorker.Module.psm1'

# Version number of this module.
ModuleVersion = '0.1.0'
Expand Down
2 changes: 1 addition & 1 deletion src/PowerShell/PowerShellManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ internal Hashtable InvokeFunction(
returnObject = pipelineItems[pipelineItems.Count - 1];
}

var result = _pwsh.AddCommand("Azure.Functions.PowerShell.Worker.Module\\Get-OutputBinding")
var result = _pwsh.AddCommand("Microsoft.Azure.Functions.PowerShellWorker.Module\\Get-OutputBinding")
.AddParameter("Purge")
.InvokeAndClearCommands<Hashtable>()[0];

Expand Down
2 changes: 1 addition & 1 deletion src/worker.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"language":"powershell",
"extensions":[".ps1"],
"defaultExecutablePath":"dotnet",
"defaultWorkerPath":"Azure.Functions.PowerShell.Worker.dll"
"defaultWorkerPath":"Microsoft.Azure.Functions.PowerShellWorker.dll"
}
}
2 changes: 1 addition & 1 deletion test/Function/FunctionLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Azure.WebJobs.Script.Grpc.Messages;
using Xunit;

namespace Azure.Functions.PowerShell.Worker.Test
namespace Microsoft.Azure.Functions.PowerShellWorker.Test
{
public class FunctionLoaderTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\src\Azure.Functions.PowerShell.Worker.csproj" />
<ProjectReference Include="..\src\Microsoft.Azure.Functions.PowerShellWorker.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion test/Requests/HandleWorkerInitRequestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Azure.WebJobs.Script.Grpc.Messages;
using Xunit;

namespace Azure.Functions.PowerShell.Worker.Test
namespace Microsoft.Azure.Functions.PowerShellWorker.Test
{
public class ProcessWorkerInitRequestTests
{
Expand Down
2 changes: 1 addition & 1 deletion test/Utility/TypeExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using Newtonsoft.Json;
using Xunit;

namespace Azure.Functions.PowerShell.Worker.Test
namespace Microsoft.Azure.Functions.PowerShellWorker.Test
{
public class TypeExtensionsTests
{
Expand Down