mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Update build and test dependencies
This commit is contained in:
parent
8de9980160
commit
e7b642380c
9 changed files with 33 additions and 32 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "Build Schema",
|
||||
"$ref": "#/definitions/build",
|
||||
"title": "Build Schema",
|
||||
"definitions": {
|
||||
"build": {
|
||||
"type": "object",
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.0.401
|
||||
7.0.402
|
|
@ -19,8 +19,6 @@ using Nuke.Common.Tooling;
|
|||
using Nuke.Common.Tools.DotNet;
|
||||
using Nuke.Common.Tools.GitVersion;
|
||||
using Nuke.Common.Tools.SignTool;
|
||||
using static Nuke.Common.IO.FileSystemTasks;
|
||||
using static Nuke.Common.IO.PathConstruction;
|
||||
using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
||||
|
||||
namespace LibHacBuild;
|
||||
|
@ -99,10 +97,9 @@ partial class Build : NukeBuild
|
|||
|
||||
try
|
||||
{
|
||||
gitRepository = (GitRepository)new GitRepositoryAttribute().GetValue(null, null);
|
||||
gitRepository = GitRepository.FromLocalDirectory(RootDirectory);
|
||||
|
||||
gitVersion = GitVersionTasks.GitVersion(s => s
|
||||
.SetFramework("net6.0")
|
||||
.DisableProcessLogOutput())
|
||||
.Result;
|
||||
}
|
||||
|
@ -127,7 +124,7 @@ partial class Build : NukeBuild
|
|||
HasGitDir = true;
|
||||
|
||||
if (DateTimeOffset.TryParseExact(gitVersion.CommitDate, "yyyy-MM-dd HH:mm:ss",
|
||||
CultureInfo.InvariantCulture.DateTimeFormat, DateTimeStyles.AssumeUniversal, out DateTimeOffset commitTime))
|
||||
CultureInfo.InvariantCulture.DateTimeFormat, DateTimeStyles.AssumeUniversal, out DateTimeOffset commitTime))
|
||||
{
|
||||
CommitTime = commitTime.LocalDateTime;
|
||||
}
|
||||
|
@ -179,17 +176,17 @@ partial class Build : NukeBuild
|
|||
Target Clean => _ => _
|
||||
.Executes(() =>
|
||||
{
|
||||
List<string> toDelete = GlobDirectories(SourceDirectory, "**/bin", "**/obj")
|
||||
.Concat(GlobDirectories(TestsDirectory, "**/bin", "**/obj")).ToList();
|
||||
List<AbsolutePath> toDelete = SourceDirectory.GlobDirectories("**/bin", "**/obj")
|
||||
.Concat(TestsDirectory.GlobDirectories("**/bin", "**/obj")).ToList();
|
||||
|
||||
foreach (string dir in toDelete)
|
||||
foreach (AbsolutePath dir in toDelete)
|
||||
{
|
||||
DeleteDirectory(dir);
|
||||
dir.DeleteDirectory();
|
||||
}
|
||||
|
||||
EnsureCleanDirectory(ArtifactsDirectory);
|
||||
EnsureCleanDirectory(CliCoreDir);
|
||||
EnsureCleanDirectory(CliNativeDir);
|
||||
ArtifactsDirectory.CreateOrCleanDirectory();
|
||||
CliCoreDir.CreateOrCleanDirectory();
|
||||
CliNativeDir.CreateOrCleanDirectory();
|
||||
});
|
||||
|
||||
Target Restore => _ => _
|
||||
|
@ -293,7 +290,7 @@ partial class Build : NukeBuild
|
|||
.Concat(Directory.EnumerateFiles(CliCoreDir, "*.dll"))
|
||||
.ToArray();
|
||||
|
||||
EnsureExistingDirectory(ArtifactsDirectory);
|
||||
ArtifactsDirectory.CreateDirectory();
|
||||
|
||||
ZipFiles(CliCoreZip, namesCore, CommitTime);
|
||||
Serilog.Log.Debug($"Created {CliCoreZip}");
|
||||
|
@ -396,7 +393,7 @@ partial class Build : NukeBuild
|
|||
ProcessTasks.StartProcess("strip", CliNativeExe).AssertZeroExitCode();
|
||||
}
|
||||
|
||||
EnsureExistingDirectory(ArtifactsDirectory);
|
||||
ArtifactsDirectory.CreateOrCleanDirectory();
|
||||
|
||||
ZipFile(CliNativeZip, CliNativeExe, $"hactoolnet{NativeProgramExtension}", CommitTime);
|
||||
Serilog.Log.Debug($"Created {CliNativeZip}");
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nuke.Common" Version="6.3.0" />
|
||||
<PackageReference Include="Nuke.Common" Version="7.0.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -23,7 +23,7 @@ public partial class Build
|
|||
|
||||
try
|
||||
{
|
||||
EnsureCleanDirectory(tempDir);
|
||||
tempDir.CreateOrCleanDirectory();
|
||||
List<string> fileList = UnzipPackage(path, tempDir);
|
||||
|
||||
string newPsmdcpName = CalcPsmdcpName(libDir);
|
||||
|
@ -123,9 +123,7 @@ public partial class Build
|
|||
|
||||
public void SignNupkg(string pkgPath, string password)
|
||||
{
|
||||
NuGetTasks.NuGet(
|
||||
$"sign \"{pkgPath}\" -CertificatePath cert.pfx -CertificatePassword {password} -Timestamper http://timestamp.digicert.com",
|
||||
outputFilter: x => x.Replace(password, "hunter2"));
|
||||
NuGetTasks.NuGet($"sign \"{pkgPath}\" -CertificatePath cert.pfx -CertificatePassword {password:r} -Timestamper http://timestamp.digicert.com");
|
||||
}
|
||||
|
||||
public static string ToHexString(byte[] arr)
|
||||
|
|
|
@ -13,10 +13,13 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageDownload Include="GitVersion.Tool" Version="[5.9.0]" />
|
||||
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
|
||||
<PackageReference Include="CsvHelper" Version="30.0.1" />
|
||||
<PackageReference Include="NuGet.CommandLine" Version="6.4.0" />
|
||||
<PackageReference Include="Nuke.Common" Version="6.3.0" />
|
||||
<PackageReference Include="NuGet.CommandLine" Version="6.7.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Nuke.Common" Version="7.0.6" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -9,11 +9,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
|
||||
<PackageReference Include="xunit.core" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.analyzers" Version="1.1.0" />
|
||||
<PackageReference Include="xunit.assert.source" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
|
||||
<PackageReference Include="xunit.core" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.analyzers" Version="1.3.0" />
|
||||
<PackageReference Include="xunit.assert.source" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -19,6 +19,6 @@ public partial class Assert
|
|||
public static void Result(Result.Base expected, Result actual)
|
||||
{
|
||||
if (!expected.Includes(actual))
|
||||
throw new EqualException(expected.Value, actual);
|
||||
throw EqualException.ForMismatchedValues(expected.Value, actual);
|
||||
}
|
||||
}
|
|
@ -16,6 +16,6 @@ public partial class Assert
|
|||
public static void Equal<T>(ReadOnlySpan<T> expected, ReadOnlySpan<T> actual) where T : unmanaged, IEquatable<T>
|
||||
{
|
||||
if (!expected.SequenceEqual(actual))
|
||||
throw new EqualException(expected.ToArray(), actual.ToArray());
|
||||
throw EqualException.ForMismatchedValues(expected.ToArray(), actual.ToArray());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue