Skip to content

Commit

Permalink
Merge pull request #99 from lahma/update-deps
Browse files Browse the repository at this point in the history
Upgrade dependencies and remove obsolete NET 6 and 7
  • Loading branch information
FlorianRappl authored Jan 26, 2025
2 parents 5187721 + b90ef8a commit bb34a75
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 94 deletions.
153 changes: 77 additions & 76 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,56 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Clean",
"Compile",
"CopyFiles",
"CreatePackage",
"Default",
"Package",
"PrePublish",
"Publish",
"PublishPackage",
"PublishPreRelease",
"PublishRelease",
"Restore",
"RunUnitTests"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
Expand All @@ -23,25 +60,8 @@
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
Expand All @@ -62,10 +82,6 @@
"type": "string"
}
},
"ReleaseNotesFilePath": {
"type": "string",
"description": "ReleaseNotesFilePath - To determine the SemanticVersion"
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
Expand All @@ -74,61 +90,46 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"CopyFiles",
"CreatePackage",
"Default",
"Package",
"PrePublish",
"Publish",
"PublishPackage",
"PublishPreRelease",
"PublishRelease",
"Restore",
"RunUnitTests"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"CopyFiles",
"CreatePackage",
"Default",
"Package",
"PrePublish",
"Publish",
"PublishPackage",
"PublishPreRelease",
"PublishRelease",
"Restore",
"RunUnitTests"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
"Debug",
"Release"
]
},
"ReleaseNotesFilePath": {
"type": "string",
"description": "ReleaseNotesFilePath - To determine the SemanticVersion"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
}
]
}
19 changes: 10 additions & 9 deletions nuke/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
using System.IO;
using System.Linq;
using Nuke.Common.Tooling;
using static Nuke.Common.IO.FileSystemTasks;

using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.NuGet.NuGetTasks;

using Project = Nuke.Common.ProjectModel.Project;

class Build : NukeBuild
Expand Down Expand Up @@ -143,7 +144,7 @@ protected override void OnBuildInitialized()
.EnableNoRestore()
.EnableNoBuild()
.SetProcessEnvironmentVariable("prefetched", "false")
.When(GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions"))
.When(_ => GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions"))
);

DotNetTest(s => s
Expand All @@ -152,7 +153,7 @@ protected override void OnBuildInitialized()
.EnableNoRestore()
.EnableNoBuild()
.SetProcessEnvironmentVariable("prefetched", "true")
.When(GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions"))
.When(_ => GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions"))
);
});

Expand All @@ -165,14 +166,14 @@ protected override void OnBuildInitialized()
var targetDir = NugetDirectory / "lib" / item;
var srcDir = BuildDirectory / item;

CopyFile(srcDir / $"{TargetProjectName}.dll", targetDir / $"{TargetProjectName}.dll", FileExistsPolicy.OverwriteIfNewer);
CopyFile(srcDir / $"{TargetProjectName}.pdb", targetDir / $"{TargetProjectName}.pdb", FileExistsPolicy.OverwriteIfNewer);
CopyFile(srcDir / $"{TargetProjectName}.xml", targetDir / $"{TargetProjectName}.xml", FileExistsPolicy.OverwriteIfNewer);
(srcDir / $"{TargetProjectName}.dll").Copy(targetDir / $"{TargetProjectName}.dll", policy: ExistsPolicy.FileOverwriteIfNewer);
(srcDir / $"{TargetProjectName}.pdb").Copy(targetDir / $"{TargetProjectName}.pdb", policy: ExistsPolicy.FileOverwriteIfNewer);
(srcDir / $"{TargetProjectName}.xml").Copy(targetDir / $"{TargetProjectName}.xml", policy: ExistsPolicy.FileOverwriteIfNewer);
}

CopyFile(SourceDirectory / $"{TargetProjectName}.nuspec", NugetDirectory / $"{TargetProjectName}.nuspec", FileExistsPolicy.OverwriteIfNewer);
CopyFile(RootDirectory / "logo.png", NugetDirectory / "logo.png", FileExistsPolicy.OverwriteIfNewer);
CopyFile(RootDirectory / "README.md", NugetDirectory / "README.md", FileExistsPolicy.OverwriteIfNewer);
(SourceDirectory / $"{TargetProjectName}.nuspec").Copy(NugetDirectory / $"{TargetProjectName}.nuspec", policy: ExistsPolicy.FileOverwriteIfNewer);
(RootDirectory / "logo.png").Copy(NugetDirectory / "logo.png", policy: ExistsPolicy.FileOverwriteIfNewer);
(RootDirectory / "README.md").Copy(NugetDirectory / "README.md", policy: ExistsPolicy.FileOverwriteIfNewer);
});

Target CreatePackage => _ => _
Expand Down
4 changes: 2 additions & 2 deletions nuke/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageReference Include="Nuke.Common" Version="9.0.4" />
</ItemGroup>

<ItemGroup>
<PackageDownload Include="NuGet.CommandLine" Version="[6.3.1]" />
<PackageDownload Include="NuGet.CommandLine" Version="[6.12.2]" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net462;net472;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472</TargetFrameworks>
<IsPackable>false</IsPackable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- https://github.com/Tyrrrz/GitHubActionsTestLogger/issues/5 -->
</PropertyGroup>
Expand All @@ -14,15 +14,15 @@

<ItemGroup>
<PackageReference Include="AngleSharp.Io" Version="1.0.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3">
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="AngleSharp.Css" Version="1.0.0-beta.139" />
<PackageReference Include="AngleSharp.Xml" Version="1.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/AngleSharp.Js/AngleSharp.Js.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RepositoryUrl>https://github.com/AngleSharp/AngleSharp.Js</RepositoryUrl>
Expand All @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="AngleSharp" Version="1.1.2" />
<PackageReference Include="Jint" Version="4.0.0" />
<PackageReference Include="Jint" Version="4.1.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
Expand Down

0 comments on commit bb34a75

Please sign in to comment.