Skip to content

Commit aed24f8

Browse files
authored
Migrate to .NET 10 (#21)
* Migrate to .NET 10 * update ci.yml * update Paths.fs * update Exec * update minver and dotnet tools * Move to github actions logger * cleanup * update logger arg
1 parent 767c372 commit aed24f8

File tree

22 files changed

+78
-148
lines changed

22 files changed

+78
-148
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@ jobs:
1818
build:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v5
2222
with:
2323
fetch-depth: 1
2424
- run: |
2525
git fetch --prune --unshallow --tags
2626
echo exit code $?
2727
git tag --list
28-
- uses: actions/setup-dotnet@v1
28+
- uses: actions/setup-dotnet@v5
2929
with:
3030
dotnet-version: |
31-
8.0.x
32-
6.0.x
31+
10.0.x
3332
source-url: https://nuget.pkg.github.com/nullean/index.json
3433
env:
3534
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<MinVerMinimumMajorMinor>0.2</MinVerMinimumMajorMinor>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageReference Include="MinVer" Version="4.3.0">
8+
<PackageReference Include="MinVer" Version="6.0.0">
99
<PrivateAssets>all</PrivateAssets>
1010
</PackageReference>
1111
</ItemGroup>

build/scripts/Paths.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let GenerateApiChanges = true
1414

1515
let Root =
1616
let mutable dir = DirectoryInfo(".")
17-
while dir.GetFiles("*.sln").Length = 0 do dir <- dir.Parent
17+
while dir.GetFiles("*.slnx").Length = 0 do dir <- dir.Parent
1818
Environment.CurrentDirectory <- dir.FullName
1919
dir
2020

build/scripts/Program.fs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ let main argv =
2626
Targets.Setup parsed arguments
2727
let swallowTypes = [typeof<ProcExecException>; typeof<ExceptionExiter>]
2828

29-
Targets.RunTargetsAndExit
30-
([target], (fun e -> swallowTypes |> List.contains (e.GetType()) ), ":")
29+
task {
30+
return! Targets.RunTargetsAndExitAsync([ target ], (fun e -> swallowTypes |> List.contains (e.GetType())), (fun _ -> ":"), null, null)
31+
} |> Async.AwaitTask |> Async.RunSynchronously
3132
0
3233

build/scripts/Targets.fs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ open ProcNet
1010

1111

1212
let exec binary args =
13-
let r = Proc.Exec (binary, args |> List.map (fun a -> sprintf "\"%s\"" a) |> List.toArray)
14-
match r.HasValue with | true -> r.Value | false -> failwithf "invocation of `%s` timed out" binary
13+
Proc.Exec (binary, args |> List.toArray)
1514

1615
let private restoreTools = lazy(exec "dotnet" ["tool"; "restore"])
1716
let private currentVersion =
@@ -42,10 +41,7 @@ let private pristineCheck (arguments:ParseResults<Arguments>) =
4241
| _ -> failwithf "The checkout folder has pending changes, aborting"
4342

4443
let private test (arguments:ParseResults<Arguments>) =
45-
let junitOutput = Path.Combine(Paths.Output.FullName, "junit-{assembly}-{framework}-test-results.xml")
46-
let loggerPathArgs = sprintf "LogFilePath=%s" junitOutput
47-
let loggerArg = sprintf "--logger:\"junit;%s\"" loggerPathArgs
48-
exec "dotnet" ["test"; "-c"; "RELEASE"; loggerArg; "--logger:pretty"] |> ignore
44+
exec "dotnet" ["test"; "-c"; "RELEASE"; "--logger:GithubActions"; "--logger:pretty"] |> ignore
4945

5046
let private generatePackages (arguments:ParseResults<Arguments>) =
5147
let output = Paths.RootRelative Paths.Output.FullName

build/scripts/scripts.fsproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88
<ItemGroup>
99
<PackageReference Include="Argu" Version="6.0.0" />
10-
<PackageReference Include="Bullseye" Version="3.3.0" />
11-
<PackageReference Include="Proc" Version="0.6.2" />
10+
<PackageReference Include="Bullseye" Version="6.0.0" />
11+
<PackageReference Include="Proc" Version="0.9.1" />
1212
<PackageReference Include="Fake.Tools.Git" Version="5.15.0" />
13+
<PackageReference Update="MinVer" Version="6.0.0" />
1314
</ItemGroup>
1415

1516
<ItemGroup>

dotnet-tools.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,32 @@
33
"isRoot": true,
44
"tools": {
55
"minver-cli": {
6-
"version": "4.3.0",
6+
"version": "6.0.0",
77
"commands": [
88
"minver"
9-
]
9+
],
10+
"rollForward": false
1011
},
1112
"release-notes": {
12-
"version": "0.6.0",
13+
"version": "0.10.0",
1314
"commands": [
1415
"release-notes"
15-
]
16+
],
17+
"rollForward": false
1618
},
1719
"nupkg-validator": {
18-
"version": "0.6.0",
20+
"version": "0.10.1",
1921
"commands": [
2022
"nupkg-validator"
21-
]
23+
],
24+
"rollForward": false
2225
},
2326
"assembly-differ": {
24-
"version": "0.15.0",
27+
"version": "0.16.0",
2528
"commands": [
2629
"assembly-differ"
27-
]
30+
],
31+
"rollForward": false
2832
}
2933
}
3034
}

examples/ScratchPad.Fs.ArgumentPrinter/ScratchPad.Fs.ArgumentPrinter.fsproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<Compile Include="Program.fs"/>
1111
</ItemGroup>
12-
1312
</Project>

examples/ScratchPad.Fs/ScratchPad.Fs.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

examples/ScratchPad/ScratchPad.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77
<ItemGroup>

0 commit comments

Comments
 (0)