Skip to content

Commit

Permalink
Merge test changes to main - v0.50.0-pre.ce2fefb (#374)
Browse files Browse the repository at this point in the history
Automatically created pull-request in order to merge changes that were
recently pushed to the test branch, back to main

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
hwinther and dependabot[bot] authored Nov 13, 2024
1 parent bebc43b commit 5d70a3c
Show file tree
Hide file tree
Showing 34 changed files with 1,788 additions and 1,046 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ concurrency:
cancel-in-progress: true

env:
DOTNET_VERSION: "8.0.x"
DOTNET_VERSION: "9.0.x"
BACKEND_SOLUTION_PATH: "src/backend"
BACKEND_SOLUTION_FILE: "Backend.sln"
WORKFLOW_SHORT_NAME: "backend-ci"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRAILING_AGENT_WORK_PATH: "/home/runner/work/test/test/"
DOTNET_VERSION: "8.0.x"
DOTNET_VERSION: "9.0.x"
BACKEND_SOLUTION_PATH: "src/backend"
BACKEND_SOLUTION_FILENAME: "Backend.sln"
FRONTEND_PATH: "src/frontend"
Expand Down
4 changes: 2 additions & 2 deletions shared/NugetDistSample/NugetDistSample.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>nuget_distribution_example</PackageId>
<Version>0.0.26</Version>
<Version>0.0.33</Version>
<Authors>Hans Christian Winther-Sørensen</Authors>
<Company>WSH</Company>
<PackageDescription>Distributing shared project files example</PackageDescription>
Expand Down
14 changes: 7 additions & 7 deletions shared/NugetDistSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
if (args.Length == 2)
{
var msbuildDir = args[0];
var solutionDir = args[1];
var projectDir = args[1];
Console.WriteLine($"MsbuildDir: {msbuildDir}");
Console.WriteLine($"SolutionDir: {solutionDir}");
Console.WriteLine($"ProjectDir: {projectDir}");

var solutionSignature = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(solutionDir));
var cachePath = Path.Combine(msbuildDir, "..", $"cached-run-{solutionSignature}");
var projectSignature = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(projectDir));
var cachePath = Path.Combine(msbuildDir, "..", $"cached-run-{projectSignature}");
if (Path.Exists(cachePath))
{
Console.WriteLine("Already executed for this solution.");
Console.WriteLine("Already executed for this project.");
return;
}

var gitFolderPath = FindGitFolder(solutionDir);
var gitFolderPath = FindGitFolder(projectDir);
if (gitFolderPath == null)
{
Console.WriteLine(".git folder not found.");
Expand All @@ -39,7 +39,7 @@
}
else
{
Console.WriteLine("Usage: NugetDistSample <MsbuildDir> <SolutionDir>");
Console.WriteLine("Usage: NugetDistSample <MsbuildDir> <ProjectDir>");
}

return;
Expand Down
10 changes: 3 additions & 7 deletions shared/NugetDistSample/build/nuget_distribution_example.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<Project>
<Target Name="DistSampleInit" BeforeTargets="CollectPackageReferences">
<!--Message Text="Dist sample init SolutionDir=$(SolutionDir)" Importance="High" />
<Message Text="Dist sample init MSBuildThisFileDirectory=$(MSBuildThisFileDirectory)" Importance="High" />
<ItemGroup>
<File Include="$(MSBuildThisFileDirectory)..\content\**\*.*"></File>
</ItemGroup>
<Copy SourceFiles="@(File)" DestinationFolder="$(SolutionDir)\"></Copy-->
<Exec Command="dotnet $(MSBuildThisFileDirectory)..\lib\$(TargetFramework)\NugetDistSample.dll $(MSBuildThisFileDirectory) $(SolutionDir)" />
<Warning Code="DSAMPLE001" Text="DistSample executing" />
<Exec
Command="dotnet $(MSBuildThisFileDirectory)..\lib\$(TargetFramework)\NugetDistSample.dll $(MSBuildThisFileDirectory) $(ProjectDir)" />
</Target>
</Project>
3 changes: 2 additions & 1 deletion shared/NugetDistSample/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": 1,
"dependencies": {
"net8.0": {}
"net8.0": {},
"net9.0": {}
}
}
Binary file modified shared/NugetDistSample/readme.md
Binary file not shown.
22 changes: 18 additions & 4 deletions src/backend/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,46 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.10",
"version": "9.0.0",
"commands": [
"dotnet-ef"
],
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.3.11",
"version": "5.4.0",
"commands": [
"reportgenerator"
],
"rollForward": false
},
"swashbuckle.aspnetcore.cli": {
"version": "6.9.0",
"version": "7.0.0",
"commands": [
"swagger"
],
"rollForward": false
},
"dotnet-stryker": {
"version": "4.3.0",
"version": "4.4.1",
"commands": [
"dotnet-stryker"
],
"rollForward": false
},
"dotnet-outdated-tool": {
"version": "4.6.4",
"commands": [
"dotnet-outdated"
],
"rollForward": false
},
"refitter": {
"version": "1.4.0",
"commands": [
"refitter"
],
"rollForward": false
}
}
}
19 changes: 19 additions & 0 deletions src/backend/ApiClient/ApiClient.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<Target Name="RefitGenerator" BeforeTargets="build" Condition="'$(Configuration)' == 'Debug'">
<Warning Code="DSAMPLE002" Text="Generating API client with refitter" />
<Exec Command="dotnet refitter ..\WebApi\swagger.json --namespace WebApi.Client --output WebApiClient.cs" />
</Target>

<ItemGroup>
<PackageReference Include="Refit" Version="8.0.0" />
</ItemGroup>

</Project>
5 changes: 5 additions & 0 deletions src/backend/ApiClient/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Refit;
using WebApi.Client;

var testApiClient = RestService.For<IExampleAPI>("https://localhost:44380");
await testApiClient.Ping();
Loading

0 comments on commit 5d70a3c

Please sign in to comment.