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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET 9
- name: Setup .NET 10
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the official .NET SDK image as a base
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build-env
ARG RESOURCE_REAPER_SESSION_ID="00000000-0000-0000-0000-000000000000"
LABEL "org.testcontainers.resource-reaper-session"=$RESOURCE_REAPER_SESSION_ID

Expand All @@ -24,7 +24,7 @@ RUN dotnet build --no-restore -c IntegrationTest -f net9.0 /app/src/Husky/Husky.
RUN dotnet pack --no-build --no-restore -c IntegrationTest -o out /app/src/Husky/Husky.csproj -p:Version=99.1.1-test -p:TargetFrameworks=net9.0

# Use the same .NET SDK image for the final stage
FROM mcr.microsoft.com/dotnet/sdk:9.0
FROM mcr.microsoft.com/dotnet/sdk:10.0
ARG RESOURCE_REAPER_SESSION_ID="00000000-0000-0000-0000-000000000000"
LABEL "org.testcontainers.resource-reaper-session"=$RESOURCE_REAPER_SESSION_ID

Expand Down
5 changes: 4 additions & 1 deletion src/Husky/Husky.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0;net7.0;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down Expand Up @@ -49,6 +49,9 @@
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<ConfigurationVersion>9.0.0</ConfigurationVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
<ConfigurationVersion>10.0.0</ConfigurationVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CliFx" Version="2.3.5" />
Expand Down
6 changes: 4 additions & 2 deletions src/Husky/TaskRunner/HuskyTaskLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public async Task LoadAsync()
.Build();
config.GetSection("tasks").Bind(Tasks);
OverrideWindowsSpecifics();

// set default filteringRule if not defined
foreach (var task in Tasks)
task.FilteringRule ??= FilteringRules.Variable;
}
catch (FileNotFoundException e)
{
Expand Down Expand Up @@ -90,8 +94,6 @@ private void OverrideWindowsSpecifics()
if (value != null)
prop.SetValue(task, value);
}

task.FilteringRule ??= FilteringRules.Variable;
}
}
}
4 changes: 2 additions & 2 deletions tests/HuskyIntegrationTests/HuskyIntegrationTests.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>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down Expand Up @@ -31,7 +31,7 @@
<ItemGroup>
<Folder Include="TestProjectBase\" />
</ItemGroup>

<ItemGroup>
<Content Include="xunit.runner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion tests/HuskyTest/HuskyTest.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>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Loading