Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .build/Build.Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ partial class Build
AbsolutePath CoverageReportDirectory => OutputDirectory / "coverage-reports";
AbsolutePath PackageDirectory => OutputDirectory / "packages";
AbsolutePath HotChocolateDirectoryBuildProps => SourceDirectory / "HotChocolate" / "Directory.Build.Props";
AbsolutePath TemplatesNuSpec => RootDirectory / "templates" / "HotChocolate.Templates.nuspec";
AbsolutePath TemplatesProj => RootDirectory / "templates" / "HotChocolate.Templates.csproj";
AbsolutePath EmptyServer12Proj => RootDirectory / "templates" / "server" / "HotChocolate.Template.Server.csproj";
AbsolutePath EmptyAzf12Proj => RootDirectory / "templates" / "azure-function" / "HotChocolate.Template.AzureFunctions.csproj";
AbsolutePath Gateway13Proj => RootDirectory / "templates" / "gateway" / "HotChocolate.Template.Gateway.csproj";
Expand Down
22 changes: 10 additions & 12 deletions .build/Build.Publish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
using Nuke.Common.IO;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.NuGet;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Helpers;
using static Nuke.Common.Tools.NuGet.NuGetTasks;

partial class Build
{
Expand Down Expand Up @@ -68,14 +66,14 @@ partial class Build
.Produces(PackageDirectory / "*.snupkg")
.Executes(() =>
{
var projFile = File.ReadAllText(EmptyServer12Proj);
File.WriteAllText(EmptyServer12Proj, projFile.Replace("14.0.0-preview.build.0", SemVersion));

projFile = File.ReadAllText(EmptyAzf12Proj);
File.WriteAllText(EmptyAzf12Proj, projFile.Replace("14.0.0-preview.build.0", SemVersion));
var projFile = File.ReadAllText(EmptyAzf12Proj);
File.WriteAllText(EmptyAzf12Proj, projFile.Replace("0.0.0-placeholder", SemVersion));

projFile = File.ReadAllText(Gateway13Proj);
File.WriteAllText(Gateway13Proj, projFile.Replace("14.0.0-preview.build.0", SemVersion));
File.WriteAllText(Gateway13Proj, projFile.Replace("0.0.0-placeholder", SemVersion));

projFile = File.ReadAllText(EmptyServer12Proj);
File.WriteAllText(EmptyServer12Proj, projFile.Replace("0.0.0-placeholder", SemVersion));
Comment thread
glen-84 marked this conversation as resolved.

DotNetBuildSonarSolution(
PackSolutionFile,
Expand Down Expand Up @@ -108,11 +106,11 @@ partial class Build
.SetAssemblyVersion(Version)
.SetVersion(SemVersion));

NuGetPack(c => c
.SetVersion(SemVersion)
.SetOutputDirectory(PackageDirectory)
DotNetPack(c => c
.SetProject(TemplatesProj)
.SetConfiguration(Configuration)
.CombineWith(t => t.SetTargetPath(TemplatesNuSpec)));
.SetOutputDirectory(PackageDirectory)
.SetVersion(SemVersion));
});

Target Publish => _ => _
Expand Down
1 change: 0 additions & 1 deletion .build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
</ItemGroup>

<ItemGroup>
<PackageDownload Include="NuGet.CommandLine" Version="[6.5.0]" />
<PackageDownload Include="dotnet-sonarscanner" Version="[5.13.0]" />
<PackageDownload Include="OpenCover" Version="[4.7.1221]" />
<PackageDownload Include="ReportGenerator" Version="[5.1.20]" />
Expand Down
31 changes: 31 additions & 0 deletions templates/HotChocolate.Templates.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageId>HotChocolate.Templates</PackageId>
<Description>Hot Chocolate GraphQL templates.</Description>
<Authors>Michael Staib</Authors>
<PackageIcon>hotchocolate-signet.png</PackageIcon>

<TargetFramework>netstandard2.0</TargetFramework>

<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<NoDefaultExcludes>true</NoDefaultExcludes>

<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<Compile Remove="**\*" />
<Content Include="azure-function\**\*;gateway\**\*;server\**\*"
Exclude="**\bin\**;**\obj\**" />
Comment thread
glen-84 marked this conversation as resolved.
<None Include="..\website\static\resources\hotchocolate-signet.png"
Pack="true"
PackagePath=""
Visible="false" />
</ItemGroup>

</Project>
16 changes: 0 additions & 16 deletions templates/HotChocolate.Templates.nuspec

This file was deleted.

2 changes: 1 addition & 1 deletion templates/azure-function/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"description": "Target .NET 10"
}
],
"replaces": "net8.0",
"replaces": "net10.0",
"defaultValue": "net10.0"
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
Expand All @@ -18,8 +18,8 @@
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" />
<PackageReference Include="HotChocolate.AzureFunctions.IsolatedProcess" Version="14.0.0-preview.build.0" />
<PackageReference Include="HotChocolate.Types.Analyzers" Version="14.0.0-preview.build.0">
<PackageReference Include="HotChocolate.AzureFunctions.IsolatedProcess" Version="0.0.0-placeholder" />
<PackageReference Include="HotChocolate.Types.Analyzers" Version="0.0.0-placeholder">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion templates/gateway/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"description": "Target .NET 10"
}
],
"replaces": "net8.0",
"replaces": "net10.0",
"defaultValue": "net10.0"
}
},
Expand Down
4 changes: 2 additions & 2 deletions templates/gateway/HotChocolate.Template.Gateway.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HotChocolate.Fusion.AspNetCore" Version="14.0.0-preview.build.0" />
<PackageReference Include="HotChocolate.Fusion.AspNetCore" Version="0.0.0-placeholder" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion templates/server/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"description": "Target .NET 10"
}
],
"replaces": "net8.0",
"replaces": "net10.0",
"defaultValue": "net10.0"
}
},
Expand Down
8 changes: 4 additions & 4 deletions templates/server/HotChocolate.Template.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>preview</LangVersion>
Expand All @@ -12,9 +12,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="HotChocolate.AspNetCore" Version="14.0.0-preview.build.0" />
<PackageReference Include="HotChocolate.AspNetCore.CommandLine" Version="14.0.0-preview.build.0" />
<PackageReference Include="HotChocolate.Types.Analyzers" Version="14.0.0-preview.build.0">
<PackageReference Include="HotChocolate.AspNetCore" Version="0.0.0-placeholder" />
<PackageReference Include="HotChocolate.AspNetCore.CommandLine" Version="0.0.0-placeholder" />
<PackageReference Include="HotChocolate.Types.Analyzers" Version="0.0.0-placeholder">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Loading