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
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
with:
fetch-depth: 1
- run: |
git fetch --prune --unshallow --tags
echo exit code $?
git tag --list
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
6.0.x
10.0.x
source-url: https://nuget.pkg.github.com/nullean/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<MinVerMinimumMajorMinor>0.2</MinVerMinimumMajorMinor>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="4.3.0">
<PackageReference Include="MinVer" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/Paths.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let GenerateApiChanges = true

let Root =
let mutable dir = DirectoryInfo(".")
while dir.GetFiles("*.sln").Length = 0 do dir <- dir.Parent
while dir.GetFiles("*.slnx").Length = 0 do dir <- dir.Parent
Environment.CurrentDirectory <- dir.FullName
dir

Expand Down
5 changes: 3 additions & 2 deletions build/scripts/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ let main argv =
Targets.Setup parsed arguments
let swallowTypes = [typeof<ProcExecException>; typeof<ExceptionExiter>]

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

8 changes: 2 additions & 6 deletions build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ open ProcNet


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

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

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

let private generatePackages (arguments:ParseResults<Arguments>) =
let output = Paths.RootRelative Paths.Output.FullName
Expand Down
7 changes: 4 additions & 3 deletions build/scripts/scripts.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Argu" Version="6.0.0" />
<PackageReference Include="Bullseye" Version="3.3.0" />
<PackageReference Include="Proc" Version="0.6.2" />
<PackageReference Include="Bullseye" Version="6.0.0" />
<PackageReference Include="Proc" Version="0.9.1" />
<PackageReference Include="Fake.Tools.Git" Version="5.15.0" />
<PackageReference Update="MinVer" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 12 additions & 8 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,32 @@
"isRoot": true,
"tools": {
"minver-cli": {
"version": "4.3.0",
"version": "6.0.0",
"commands": [
"minver"
]
],
"rollForward": false
},
"release-notes": {
"version": "0.6.0",
"version": "0.10.0",
"commands": [
"release-notes"
]
],
"rollForward": false
},
"nupkg-validator": {
"version": "0.6.0",
"version": "0.10.1",
"commands": [
"nupkg-validator"
]
],
"rollForward": false
},
"assembly-differ": {
"version": "0.15.0",
"version": "0.16.0",
"commands": [
"assembly-differ"
]
],
"rollForward": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Include="Program.fs"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion examples/ScratchPad.Fs/ScratchPad.Fs.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/ScratchPad/ScratchPad.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/ScratchPad/TestBinary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static StartArguments TestCaseArguments(string testcase) =>

private static string GetDll()
{
var dll = Path.Combine("bin", GetRunningConfiguration(), "net8.0", _procTestBinary + ".dll");
var dll = Path.Combine("bin", GetRunningConfiguration(), "net10.0", _procTestBinary + ".dll");
var fullPath = Path.Combine(GetWorkingDir(), dll);
if (!File.Exists(fullPath)) throw new Exception($"Can not find {fullPath}");

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "10.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
103 changes: 0 additions & 103 deletions proc.sln

This file was deleted.

29 changes: 29 additions & 0 deletions proc.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Solution>
<Folder Name="/build/">
<File Path=".editorconfig" />
<File Path=".github/workflows/ci.yml" />
<File Path=".gitignore" />
<File Path="build.bat" />
<File Path="build.sh" />
<File Path="Directory.Build.props" />
<File Path="dotnet-tools.json" />
<File Path="global.json" />
<File Path="readme.md" />
<Project Path="build/scripts/scripts.fsproj" />
</Folder>
<Folder Name="/examples/">
<Project Path="examples/ScratchPad.Fs.ArgumentPrinter/ScratchPad.Fs.ArgumentPrinter.fsproj" />
<Project Path="examples/ScratchPad.Fs/ScratchPad.Fs.fsproj" />
<Project Path="examples/ScratchPad/ScratchPad.csproj" />
</Folder>
<Folder Name="/src/">
<Project Path="src/Proc.ControlC/Proc.ControlC.csproj" />
<Project Path="src/Proc.Fs/Proc.Fs.fsproj" />
<Project Path="src/Proc/Proc.csproj" />
</Folder>
<Folder Name="/tests/">
<File Path="tests/Directory.Build.props" />
<Project Path="tests/Proc.Tests.Binary/Proc.Tests.Binary.csproj" />
<Project Path="tests/Proc.Tests/Proc.Tests.csproj" />
</Folder>
</Solution>
1 change: 1 addition & 0 deletions src/Proc.Fs/Proc.Fs.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@
<ItemGroup>
<ProjectReference Include="..\Proc\Proc.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Proc/Proc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>proc</AssemblyName>
<TargetFrameworks>netstandard2.0;netstandard2.1;net461;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net461;net8.0;net10.0</TargetFrameworks>
<RootNamespace>ProcNet</RootNamespace>


Expand Down
3 changes: 1 addition & 2 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))"/>
<ItemGroup>
<PackageReference Include="JunitXml.TestLogger" Version="2.1.15" PrivateAssets="All" />
<PackageReference Include="Nullean.VsTest.Pretty.TestLogger" Version="0.3.0" PrivateAssets="All" />
<PackageReference Include="Nullean.VsTest.Pretty.TestLogger" Version="0.10.0" PrivateAssets="All" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion tests/Proc.Tests.Binary/Proc.Tests.Binary.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AssemblyName>Proc.Tests.Binary</AssemblyName>
<RootNamespace>Proc.Tests.Binary</RootNamespace>
<NoWarn>CS1701,CS1591</NoWarn>
Expand Down
4 changes: 2 additions & 2 deletions tests/Proc.Tests/ControlCTestCases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public void ControlCIngoredByCmd() {
var args = CmdTestCaseArguments("TrulyLongRunning");
args.SendControlCFirst = true;
args.WaitForExit = TimeSpan.FromSeconds(2);

var process = new ObservableProcess(args);
process.SubscribeLines(c => { });

Action call = () => process.WaitForCompletion(TimeSpan.FromSeconds(1));

call.ShouldNotThrow<IOException>();
call.Should().NotThrow<IOException>();
}
}
}
14 changes: 9 additions & 5 deletions tests/Proc.Tests/Proc.Tests.csproj
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>
<AssemblyName>Proc.Tests</AssemblyName>
<RootNamespace>ProcNet.Tests</RootNamespace>
<IsPackable>false</IsPackable>
Expand All @@ -13,13 +13,17 @@
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Reactive.Linq" Version="4.0.0-preview00001" />
<PackageReference Include="FluentAssertions" Version="4.19.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="FluentAssertions" Version="7.2.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
</ItemGroup>
</Project>
Loading