mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Target .NET Core 3.0 (#85)
* Target .NET Core 3.0 * Update build and test project packages * Update AppVeyor build image
This commit is contained in:
parent
9b9e83f1dc
commit
be907ce4bb
7 changed files with 24 additions and 28 deletions
|
@ -1 +1 @@
|
|||
2.2.401
|
||||
3.0.100
|
|
@ -1,5 +1,5 @@
|
|||
version: 0.1.3-{build}
|
||||
image: Visual Studio 2017
|
||||
version: 0.0.0-{build}
|
||||
image: Visual Studio 2019
|
||||
environment:
|
||||
myget_api_key:
|
||||
secure: 0xJoYAtR6psXCRvk1qm5czDObkeRjHKPjfe5gIExXVFPwA0VVODYv/hBZYUtz2F3
|
||||
|
|
|
@ -11,7 +11,7 @@ using System.Xml.Linq;
|
|||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using ILRepacking;
|
||||
using Nuke.Common;
|
||||
using Nuke.Common.BuildServers;
|
||||
using Nuke.Common.CI.AppVeyor;
|
||||
using Nuke.Common.Git;
|
||||
using Nuke.Common.IO;
|
||||
using Nuke.Common.ProjectModel;
|
||||
|
@ -40,7 +40,7 @@ namespace LibHacBuild
|
|||
AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts";
|
||||
AbsolutePath SignedArtifactsDirectory => ArtifactsDirectory / "signed";
|
||||
AbsolutePath TempDirectory => RootDirectory / ".tmp";
|
||||
AbsolutePath CliCoreDir => TempDirectory / "hactoolnet_netcoreapp2.1";
|
||||
AbsolutePath CliCoreDir => TempDirectory / "hactoolnet_netcoreapp3.0";
|
||||
AbsolutePath CliFrameworkDir => TempDirectory / "hactoolnet_net46";
|
||||
AbsolutePath CliNativeDir => TempDirectory / "hactoolnet_native";
|
||||
AbsolutePath CliFrameworkZip => ArtifactsDirectory / "hactoolnet.zip";
|
||||
|
@ -57,7 +57,7 @@ namespace LibHacBuild
|
|||
string AppVeyorVersion { get; set; }
|
||||
Dictionary<string, object> VersionProps { get; set; } = new Dictionary<string, object>();
|
||||
|
||||
private const string MyGetSource = "https://dotnet.myget.org/F/dotnet-core/api/v3/index.json";
|
||||
private const string DotNetFeedSource = "https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json";
|
||||
const string CertFileName = "cert.pfx";
|
||||
|
||||
private bool IsMasterBranch => _gitVersion?.BranchName.Equals("master") ?? false;
|
||||
|
@ -144,7 +144,7 @@ namespace LibHacBuild
|
|||
|
||||
DotNetPublish(s => publishSettings
|
||||
.SetProject(HactoolnetProject)
|
||||
.SetFramework("netcoreapp2.1")
|
||||
.SetFramework("netcoreapp3.0")
|
||||
.SetOutput(CliCoreDir)
|
||||
.SetNoBuild(true)
|
||||
.SetProperties(VersionProps));
|
||||
|
@ -233,7 +233,7 @@ namespace LibHacBuild
|
|||
.EnableNoBuild()
|
||||
.SetConfiguration(Configuration);
|
||||
|
||||
if (EnvironmentInfo.IsUnix) settings = settings.SetProperty("TargetFramework", "netcoreapp2.1");
|
||||
if (EnvironmentInfo.IsUnix) settings = settings.SetProperty("TargetFramework", "netcoreapp3.0");
|
||||
|
||||
DotNetTest(s => settings);
|
||||
});
|
||||
|
@ -272,7 +272,7 @@ namespace LibHacBuild
|
|||
AbsolutePath nupkgFile = ArtifactsDirectory.GlobFiles("*.nupkg").Single();
|
||||
AbsolutePath snupkgFile = ArtifactsDirectory.GlobFiles("*.snupkg").Single();
|
||||
|
||||
string apiKey = EnvironmentInfo.Variable("myget_api_key");
|
||||
string apiKey = EnvironmentInfo.GetVariable<string>("myget_api_key");
|
||||
DotNetNuGetPushSettings settings = new DotNetNuGetPushSettings()
|
||||
.SetApiKey(apiKey)
|
||||
.SetSymbolApiKey(apiKey)
|
||||
|
@ -298,7 +298,7 @@ namespace LibHacBuild
|
|||
|
||||
XDocument doc = XDocument.Load(NugetConfig);
|
||||
doc.Element("configuration").Element("packageSources").Add(new XElement("add",
|
||||
new XAttribute("key", "myget"), new XAttribute("value", MyGetSource)));
|
||||
new XAttribute("key", "myget"), new XAttribute("value", DotNetFeedSource)));
|
||||
|
||||
doc.Save(NugetConfig);
|
||||
|
||||
|
@ -309,7 +309,7 @@ namespace LibHacBuild
|
|||
|
||||
DotNetPublish(s => publishSettings
|
||||
.SetProject(nativeProject)
|
||||
.SetFramework("netcoreapp2.1")
|
||||
.SetFramework("netcoreapp3.0")
|
||||
.SetRuntime("win-x64")
|
||||
.SetOutput(CliNativeDir)
|
||||
.SetProperties(VersionProps));
|
||||
|
@ -559,7 +559,7 @@ namespace LibHacBuild
|
|||
|
||||
// Avoid having multiple signed versions of the same file
|
||||
File.Copy(nupkgDir / "lib" / "net46" / "LibHac.dll", netFxDir / "LibHac.dll", true);
|
||||
File.Copy(nupkgDir / "lib" / "netcoreapp2.1" / "LibHac.dll", coreFxDir / "LibHac.dll", true);
|
||||
File.Copy(nupkgDir / "lib" / "netcoreapp3.0" / "LibHac.dll", coreFxDir / "LibHac.dll", true);
|
||||
|
||||
ZipDirectory(SignedArtifactsDirectory / Path.GetFileName(nupkgFile), nupkgDir, pkgFileList);
|
||||
ZipDirectory(SignedArtifactsDirectory / Path.GetFileName(CliFrameworkZip), netFxDir);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<RootNamespace>LibHacBuild</RootNamespace>
|
||||
<IsPackable>False</IsPackable>
|
||||
|
@ -10,11 +10,11 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GitVersion.CommandLine.DotNetCore" Version="5.0.0" />
|
||||
<PackageReference Include="ILRepack.Lib" Version="2.0.17" NoWarn="NU1701" />
|
||||
<PackageReference Include="NuGet.CommandLine" Version="5.1.0" />
|
||||
<PackageReference Include="Nuke.Common" Version="0.21.2" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.1.0" />
|
||||
<PackageReference Include="GitVersion.CommandLine.DotNetCore" Version="5.0.1" />
|
||||
<PackageReference Include="ILRepack.Lib" Version="2.0.18" NoWarn="NU1701" />
|
||||
<PackageReference Include="NuGet.CommandLine" Version="5.2.0" />
|
||||
<PackageReference Include="Nuke.Common" Version="0.22.2" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFrameworks>netcoreapp2.1;netstandard2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp3.0;netstandard2.0;net46</TargetFrameworks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
<DefineConstants>$(DefineConstants);USE_RSA_CNG</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||
<DefineConstants>$(DefineConstants);STREAM_SPAN;STRING_SPAN;HAS_FILE_SYSTEM_NAME;CROSS_PLATFORM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -49,10 +49,6 @@
|
|||
<PackageReference Include="System.Memory" Version="4.5.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0-preview.2" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFrameworks>netcoreapp2.1;net46</TargetFrameworks>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<TargetFrameworks>netcoreapp3.0;net46</TargetFrameworks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks>
|
||||
<TargetFrameworks>net46;netcoreapp3.0</TargetFrameworks>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue