Skip to content
Open
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
9 changes: 8 additions & 1 deletion src/AzureFunctions/Definition.target
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@
<Data>
<ApplicationServer>Generic Servlet 6.0</ApplicationServer>
</Data>
</Generator>
</Generator>
<Generator>
<Id>15</Id>
<SupportFiles>
<File>services.deployment.azurefunctions.csproj</File>
</SupportFiles>
<Data/>
</Generator>
</Generators>
<DataSources>
<DataSource Id="12" /> <!-- Microsoft SQL Server -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="CopyNugetSources">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>
<AssemblyName>services.deployment.azurefunctions.csproj</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Configurations>Debug;Release;Release_Trial;Debug_Trial</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GeneXus.Deploy.AzureFunctions.Handlers" Version="$(GenStdVersion)" />
<PackageReference Include="GeneXus.Deploy.AzureFunctionsLibraries" Version="$(GenStdVersion)" />
</ItemGroup>

<PropertyGroup>
<NugetCachePath Condition="'$(NugetCachePath)' == '' and '$(OS)' == 'Windows_NT'">$([System.Environment]::ExpandEnvironmentVariables('%UserProfile%\.nuget\packages'))</NugetCachePath>
<NugetCachePath Condition="'$(NugetCachePath)' == '' and '$(OS)' != 'Windows_NT'">$([System.Environment]::ExpandEnvironmentVariables('$(HOME)/.nuget/packages'))</NugetCachePath>
</PropertyGroup>

<ItemGroup>
<NugetFileAzureClasses Include="
$(NugetCachePath)\GeneXus.Deploy.AzureFunctionsLibraries\$(GenStdVersion)\src\**\*.*">
<OutputDir>GeneXus.Deploy.AzureFunctionsLibraries</OutputDir>
</NugetFileAzureClasses>
<NugetFileAzureClasses Include="
$(NugetCachePath)\GeneXus.Deploy.AzureFunctions.Handlers\$(GenStdVersion)\src\**\*.*">
<OutputDir>GeneXus.Deploy.AzureFunctions.Handlers</OutputDir>
</NugetFileAzureClasses>
</ItemGroup>

<Target Name="CopyNugetSources" AfterTargets="Publish">
<Copy SourceFiles="%(NugetFileAzureClasses.Identity)" DestinationFolder="$(DeploySrcBuildPath)\%(NugetFileAzureClasses.OutputDir)\%(NugetFileAzureClasses.RecursiveDir)" SkipUnchangedFiles="true" ContinueOnError="ErrorAndContinue"/>
</Target>
</Project>
21 changes: 20 additions & 1 deletion src/Common/Azure/azurefunctions-create-NETpackage.targets
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@

</Target>

<Target Name="CopyNugetSources" Condition = "'$(NETGenerator)' == 'true'">
<!--Download GeneXus Azure Functions sources from nuget -->

<Target Name="GetProjectFilesFromDeployTargets" Condition="'$(NETGenerator)' == 'true'">
<GetSupportFiles
DeployTargetId="$(DeployTarget)"
Generator ="$(GENERATOR)">
<Output TaskParameter="TgSupportFilesItem" ItemName="TgSupportFilesItem"/>
</GetSupportFiles>
</Target>

<Copy SourceFiles="$(SourcePath)\Directory.build.props"
DestinationFolder="$(DeploySrcBuildPath)" SkipUnchangedFiles="true" />

<Message Text="dotnet publish &quot;@(TgSupportFilesItem)&quot; -c Release" Importance="high"/>
<Exec Command="dotnet publish &quot;@(TgSupportFilesItem)&quot; -c Release" WorkingDirectory="$(DeploySrcBuildPath)" ConsoleToMSBuild="true"/>

</Target>

<Target Name="GenerateSources" Condition = "'$(NETGenerator)' == 'true'">

<MakeDir
Expand Down Expand Up @@ -124,7 +143,7 @@
/>
</Target>

<Target Name="PrepareDeploy" DependsOnTargets="GenerateSources;GenerateConfigs;RedisSupport;CopyAzureBinaries;UpdateHostJsonFile" Condition="'$(NETGenerator)' == 'true'">
<Target Name="PrepareDeploy" DependsOnTargets="CopyNugetSources;GenerateSources;GenerateConfigs;RedisSupport;CopyAzureBinaries;UpdateHostJsonFile" Condition="'$(NETGenerator)' == 'true'">
<Message Text="Adding required files to the deploy...(this may take a while)" Importance="high"/>

<ItemGroup>
Expand Down
Loading