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
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 1
- run: |
git fetch --prune --unshallow --tags
echo exit code $?
git tag --list
- uses: actions/setup-dotnet@v4
- uses: actions/setup-dotnet@v5
with:
# 6.x is required to run generate release notes (for now)
dotnet-version: |
9.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 Expand Up @@ -61,6 +59,6 @@ jobs:
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
name: Create or update release for tag on github

- run: dotnet nuget push build/output/*.nupkg -k ${{secrets.NUGET_ORG_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols true
- run: dotnet nuget push 'build/output/*.nupkg' -k ${{secrets.NUGET_ORG_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols true
name: release to nuget.org
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinVerDefaultPreReleaseIdentifiers>canary.0</MinVerDefaultPreReleaseIdentifiers>
<MinVerMinimumMajorMinor>0.2</MinVerMinimumMajorMinor>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="2.5.0">
<PackageReference Include="MinVer" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
41 changes: 0 additions & 41 deletions assembly-differ.sln

This file was deleted.

17 changes: 17 additions & 0 deletions assembly-differ.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Solution>
<Folder Name="/build/">
<File Path=".github/workflows/ci.yml" />
<File Path="build.bat" />
<File Path="build.sh" />
<File Path="Directory.Build.props" />
<File Path="dotnet-tools.json" />
<File Path="global.json" />
<File Path="LICENSE" />
<File Path="nuget-icon.png" />
<File Path="README.md" />
<Project Path="build/scripts/scripts.fsproj" />
</Folder>
<Folder Name="/src/">
<Project Path="src/assembly-differ/assembly-differ.csproj" />
</Folder>
</Solution>
2 changes: 1 addition & 1 deletion build/scripts/Paths.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let Repository = sprintf "nullean/%s" ToolName

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

13 changes: 5 additions & 8 deletions build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,19 @@ open Fake.Tools.Git
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 =
lazy(
restoreTools.Value |> ignore
let r = Proc.Start("dotnet", "minver", "-p", "canary.0")
let r = Proc.Start("dotnet", "minver", "-p", "canary.0", "-m", "0.1")
let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith "MinVer:"))
o.Line
)

let private currentVersionInformational =
lazy(
sprintf "%s+%s" currentVersion.Value (Information.getCurrentSHA1( "."))
)
lazy(sprintf "%s+%s" currentVersion.Value (Information.getCurrentSHA1( ".")))

let private clean (arguments:ParseResults<Arguments>) =
if (Paths.Output.Exists) then Paths.Output.Delete (true)
Expand Down Expand Up @@ -53,11 +50,11 @@ let private generateApiChanges (arguments:ParseResults<Arguments>) =
let output = Paths.RootRelative <| Paths.Output.FullName
let currentVersion = currentVersion.Value
let project = Paths.RootRelative Paths.ToolProject.FullName
let dotnetRun =[ "run"; "-c"; "Release"; "-f"; "net9.0"; "--project"; project]
let dotnetRun =[ "run"; "-c"; "Release"; "-f"; "net10.0"; "--project"; project]
let args =
[
sprintf "previous-nuget|%s|%s|net8.0" Paths.ToolName currentVersion;
sprintf "directory|src/%s/bin/Release/net9.0" Paths.ToolName;
sprintf "directory|src/%s/bin/Release/net10.0" Paths.ToolName;
"--target"; Paths.ToolName; "-f"; "github-comment"; "--output"; output
]

Expand Down
7 changes: 3 additions & 4 deletions build/scripts/scripts.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Argu" Version="6.2.5" />
<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.20.3" />
<PackageReference Update="MinVer" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 9 additions & 6 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@
"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
}
}
}
2 changes: 1 addition & 1 deletion 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": "latestFeature",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ public IEnumerable<FileInfo> GetAssemblies(HashSet<string> targets)
var arguments = new StartArguments(_command.BuildCommand, _command.BuildArguments)
{
WorkingDirectory = repoDirectory,
Timeout = TimeSpan.FromMinutes(10),
WaitForStreamReadersTimeout = TimeSpan.FromMinutes(1),
};

result = Proc.Start(arguments, TimeSpan.FromMinutes(10));
result = Proc.Start(arguments);

var output = Path.GetFullPath(Path.Combine(repoDirectory, _command.Output));
var isFile = false;
Expand Down
6 changes: 2 additions & 4 deletions src/assembly-differ/assembly-differ.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<AssemblyName>assembly-differ</AssemblyName>
<RootNamespace>AssemblyDiffer</RootNamespace>
<PackAsTool>true</PackAsTool>
Expand Down Expand Up @@ -29,15 +29,13 @@
<ItemGroup>
<PackageReference Include="Argu" Version="6.2.5" />
<PackageReference Include="Mono.Options" Version="5.3.0.1" />
<PackageReference Include="Proc" Version="0.3.7" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageReference Include="Proc" Version="0.9.1" />
<PackageReference Include="NuGet.Frameworks" Version="6.13.1" />
<PackageReference Include="NuGet.Versioning" Version="6.13.1" />
<PackageReference Include="NuGet.Protocol" Version="6.13.1" />
<PackageReference Include="NuGet.Packaging" Version="6.13.1" />
<PackageReference Include="NuGet.Resolver" Version="6.13.1" />
<PackageReference Include="NuGet.Common" Version="6.13.1" />
<PackageReference Update="MinVer" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down