Update to .NET core 2.1 RTM and setup builds

This commit is contained in:
flightlevel 2018-06-02 17:33:26 +10:00
parent e73ae99e38
commit f09c5722be
3 changed files with 70 additions and 35 deletions

View File

@ -136,15 +136,8 @@ Task("Package-Files-Full-Framework-Mono")
.IsDependentOn("Check-Packaging-Platform")
.Does(() =>
{
var cygMonoBuildPath = RelativeWinPathToCygPath(monoBuildFullFramework);
var tarFileName = "Jackett.Binaries.Mono.tar";
var tarArguments = @"-cvf " + cygMonoBuildPath + "/" + tarFileName + " -C " + cygMonoBuildPath + " Jackett --mode ='755'";
var gzipArguments = @"-k " + cygMonoBuildPath + "/" + tarFileName;
RunCygwinCommand("Tar", tarArguments);
RunCygwinCommand("Gzip", gzipArguments);
MoveFile($"{monoBuildFullFramework}/{tarFileName}.gz", $"./{artifactsDirName}/{tarFileName}.gz");
Gzip(monoBuildFullFramework, $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.Mono.tar.gz");
Information(@"Full Framework Mono Binaries Gzip Completed");
});
Task("Package-Full-Framework")
@ -156,6 +149,25 @@ Task("Package-Full-Framework")
Information("Full Framwork Packaging Completed");
});
Task("Experimental")
.IsDependentOn("Clean")
.Does(() =>
{
ExperimentalPublish("netcoreapp2.1", "win-x86");
ExperimentalPublish("netcoreapp2.1", "linux-x64");
ExperimentalPublish("netcoreapp2.1", "osx-x64");
Zip("./BuildOutput/Experimental/netcoreapp2.1/win-x86", $"./{artifactsDirName}/Experimental.netcoreapp.win-x86.zip");
Zip("./BuildOutput/Experimental/netcoreapp2.1/osx-x64", $"./{artifactsDirName}/Experimental.netcoreapp.osx-x64.zip");
Gzip("./BuildOutput/Experimental/netcoreapp2.1/linux-x64", $"./{artifactsDirName}", "Jackett", "Experimental.netcoreapp.linux-x64.tar.gz");
ExperimentalPublish("net461", "win7-x86");
ExperimentalPublish("net461", "linux-x64");
Zip("./BuildOutput/Experimental/net461/win7-x86", $"./{artifactsDirName}/Experimental.net461.win7-x86.zip");
Gzip("./BuildOutput/Experimental/net461/linux-x64", $"./{artifactsDirName}", "Jackett", "Experimental.mono.linux-x64.tar.gz");
});
Task("Appveyor-Push-Artifacts")
.IsDependentOn("Package-Full-Framework")
.Does(() =>
@ -263,16 +275,42 @@ private void RunCygwinCommand(string utility, string utilityArguments)
private string RelativeWinPathToCygPath(string relativePath)
{
var cygdriveBase = "/cygdrive/" + workingDir.ToString().Replace(":", "").Replace("\\", "/");
var cygPath = cygdriveBase + relativePath.Replace(".", "");
var cygPath = cygdriveBase + relativePath.TrimStart('.');
return cygPath;
}
private void Gzip(string sourceFolder, string outputDirectory, string tarCdirectoryOption, string outputFileName)
{
var cygSourcePath = RelativeWinPathToCygPath(sourceFolder);
var tarFileName = outputFileName.Remove(outputFileName.Length - 3, 3);
var tarArguments = @"-cvf " + cygSourcePath + "/" + tarFileName + " -C " + cygSourcePath + $" {tarCdirectoryOption} --mode ='755'";
var gzipArguments = @"-k " + cygSourcePath + "/" + tarFileName;
RunCygwinCommand("Tar", tarArguments);
RunCygwinCommand("Gzip", gzipArguments);
MoveFile($"{sourceFolder}/{tarFileName}.gz", $"{outputDirectory}/{tarFileName}.gz");
}
private void ExperimentalPublish(string framework, string runtime)
{
var settings = new DotNetCorePublishSettings
{
Framework = framework,
Runtime = runtime,
OutputDirectory = $"./BuildOutput/Experimental/{framework}/{runtime}/Jackett"
};
DotNetCorePublish("./src/Jackett.Server/Jackett.Server.csproj", settings);
}
//////////////////////////////////////////////////////////////////////
// TASK TARGETS
//////////////////////////////////////////////////////////////////////
Task("Default")
.IsDependentOn("Release-Notes")
.IsDependentOn("Experimental")
.Does(() =>
{
Information("Default Task Completed");

View File

@ -2,42 +2,39 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
<ApplicationIcon>jackett.ico</ApplicationIcon>
<AssemblyName>JackettConsole</AssemblyName>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<RuntimeIdentifiers>win-x86;linux-x64;osx-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
<RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
<!-- Conditionally obtain references for the .NET Core App 2.1 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0-rc1-final" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.4.0" />
</ItemGroup>
<!-- Conditionally obtain references for the .NET Full 4.6.1 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.AspNetCore.Rewrite" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="2.1.0-rc1-final" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0-rc1" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.8.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.2" />
<PackageReference Include="AutoMapper" Version="6.2.2" />
<PackageReference Include="CommandLineParser" Version="2.2.1" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Rewrite" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="2.1.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
</ItemGroup>
<ItemGroup>

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB