Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Build & test (Release)
run: dotnet test src -c Release --logger "console;verbosity=normal"
2 changes: 1 addition & 1 deletion .github/workflows/tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Should Deploy?
if: ${{ success() && github.event_name == 'push' }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG TARGETARCH
WORKDIR /app

Expand All @@ -22,7 +22,7 @@ COPY . ./
RUN dotnet publish src/UnityNuGet.Server -a "$TARGETARCH" -c Release -o /app/src/out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:9.0
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /app/src/out .
ENTRYPOINT ["dotnet", "UnityNuGet.Server.dll"]
2 changes: 1 addition & 1 deletion src/UnityNuGet.Server.Tests/UnityNuGet.Server.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsPublishable>false</IsPublishable>
</PropertyGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/UnityNuGet.Server/EndpointRouteBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ private static void MapGetAll(this IEndpointRouteBuilder builder)
}

NpmPackageListAllResponse? result = instance?.All();

return Results.Json(result, UnityNuGetJsonSerializerContext.Default);
});
}
Expand All @@ -54,6 +55,7 @@ private static void MapGetPackage(this IEndpointRouteBuilder builder)
}

NpmPackage? package = instance?.GetPackage(id);

if (package == null)
{
return Results.Json(NpmError.NotFound, UnityNuGetJsonSerializerContext.Default);
Expand All @@ -73,6 +75,7 @@ private static void MapDownloadPackage(this IEndpointRouteBuilder builder)
}

NpmPackage? package = instance?.GetPackage(id);

if (package == null)
{
return Results.Json(NpmError.NotFound, UnityNuGetJsonSerializerContext.Default);
Expand All @@ -84,6 +87,7 @@ private static void MapDownloadPackage(this IEndpointRouteBuilder builder)
}

string? filePath = instance?.GetPackageFilePath(file);

if (string.IsNullOrEmpty(filePath) || !File.Exists(filePath))
{
return Results.Json(NpmError.NotFound, UnityNuGetJsonSerializerContext.Default);
Expand All @@ -94,6 +98,7 @@ private static void MapDownloadPackage(this IEndpointRouteBuilder builder)
{
httpContext.Response.ContentType = "application/octet-stream";
httpContext.Response.ContentLength = new FileInfo(filePath).Length;

return Results.Ok();
}
else
Expand Down Expand Up @@ -174,6 +179,7 @@ private static void MapStatus(this IEndpointRouteBuilder builder)
string output = Template
.Parse(text)
.Render(templateContext);

await context.Response.WriteAsync(output);
});
}
Expand Down
5 changes: 1 addition & 4 deletions src/UnityNuGet.Server/UnityNuGet.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<UserSecretsId>1be0a769-8d75-4a27-99e0-128afcc0ffee</UserSecretsId>
<PublishAot>false</PublishAot>
</PropertyGroup>
Expand All @@ -13,9 +13,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Options" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/UnityNuGet.Tests/UnityNuGet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsPublishable>false</IsPublishable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/UnityNuGet.Tool/UnityNuGet.Tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<InterceptorsNamespaces>$(InterceptorsNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration</InterceptorsNamespaces>
<PackAsTool>true</PackAsTool>
<ToolCommandName>unityNuGet</ToolCommandName>
Expand Down
6 changes: 1 addition & 5 deletions src/UnityNuGet/UnityNuGet.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Version>0.14.0</Version>
<TargetFramework>net10.0</TargetFramework>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

Expand All @@ -22,15 +21,12 @@

<ItemGroup>
<PackageReference Include="ICSharpCode.Decompiler" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
<PackageReference Include="Microsoft.Extensions.Options" />
<PackageReference Include="Microsoft.NET.ILLink.Tasks" />
<PackageReference Include="NuGet.PackageManagement" />
<PackageReference Include="NUglify" />
<PackageReference Include="Scriban" />
<PackageReference Include="SharpZipLib" />
<PackageReference Include="System.ComponentModel.Annotations" />
<PackageReference Include="System.Linq.Async" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "10.0.100",
"rollForward": "latestMinor",
"allowPrerelease": false
}
Expand Down