mirror of
https://github.com/Jackett/Jackett
synced 2025-02-22 06:10:49 +00:00
Update build script so that binaries get pushed
This commit is contained in:
parent
53162b4bd3
commit
9abce7a586
1 changed files with 14 additions and 11 deletions
25
build.cake
25
build.cake
|
@ -6,7 +6,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var target = Argument("target", "Default");
|
var target = Argument("target", "Default");
|
||||||
var configuration = Argument("configuration", "Release");
|
var configuration = Argument("configuration", "Debug");
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// PREPARATION
|
// PREPARATION
|
||||||
|
@ -36,8 +36,8 @@ Task("Clean")
|
||||||
.IsDependentOn("Info")
|
.IsDependentOn("Info")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
CleanDirectories("./src/**/obj" + configuration);
|
CleanDirectories("./src/**/obj");
|
||||||
CleanDirectories("./src/**/bin" + configuration);
|
CleanDirectories("./src/**/bin");
|
||||||
CleanDirectories("./BuildOutput");
|
CleanDirectories("./BuildOutput");
|
||||||
CleanDirectories("./" + artifactsDirName);
|
CleanDirectories("./" + artifactsDirName);
|
||||||
CleanDirectories("./" + testResultsDirName);
|
CleanDirectories("./" + testResultsDirName);
|
||||||
|
@ -153,16 +153,19 @@ Task("Experimental")
|
||||||
.IsDependentOn("Clean")
|
.IsDependentOn("Clean")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
ExperimentalPublish("netcoreapp2.1", "win-x86");
|
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||||
ExperimentalPublish("netcoreapp2.1", "linux-x64");
|
string serviceProjectPath = "./src/Jackett.Service.Windows/Jackett.Service.Windows.csproj";
|
||||||
ExperimentalPublish("netcoreapp2.1", "osx-x64");
|
|
||||||
|
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "win-x86");
|
||||||
|
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "linux-x64");
|
||||||
|
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "osx-x64");
|
||||||
|
|
||||||
Zip("./BuildOutput/Experimental/netcoreapp2.1/win-x86", $"./{artifactsDirName}/Experimental.netcoreapp.win-x86.zip");
|
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");
|
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");
|
Gzip("./BuildOutput/Experimental/netcoreapp2.1/linux-x64", $"./{artifactsDirName}", "Jackett", "Experimental.netcoreapp.linux-x64.tar.gz");
|
||||||
|
|
||||||
ExperimentalPublish("net461", "win7-x86");
|
DotNetCorePublish(serviceProjectPath, "net461", "win7-x86");
|
||||||
ExperimentalPublish("net461", "linux-x64");
|
DotNetCorePublish(serverProjectPath, "net461", "linux-x64");
|
||||||
|
|
||||||
Zip("./BuildOutput/Experimental/net461/win7-x86", $"./{artifactsDirName}/Experimental.net461.win7-x86.zip");
|
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");
|
Gzip("./BuildOutput/Experimental/net461/linux-x64", $"./{artifactsDirName}", "Jackett", "Experimental.mono.linux-x64.tar.gz");
|
||||||
|
@ -170,6 +173,7 @@ Task("Experimental")
|
||||||
|
|
||||||
Task("Appveyor-Push-Artifacts")
|
Task("Appveyor-Push-Artifacts")
|
||||||
.IsDependentOn("Package-Full-Framework")
|
.IsDependentOn("Package-Full-Framework")
|
||||||
|
.IsDependentOn("Experimental")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
if (AppVeyor.IsRunningOnAppVeyor)
|
if (AppVeyor.IsRunningOnAppVeyor)
|
||||||
|
@ -292,7 +296,7 @@ private void Gzip(string sourceFolder, string outputDirectory, string tarCdirect
|
||||||
MoveFile($"{sourceFolder}/{tarFileName}.gz", $"{outputDirectory}/{tarFileName}.gz");
|
MoveFile($"{sourceFolder}/{tarFileName}.gz", $"{outputDirectory}/{tarFileName}.gz");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExperimentalPublish(string framework, string runtime)
|
private void DotNetCorePublish(string projectPath, string framework, string runtime)
|
||||||
{
|
{
|
||||||
var settings = new DotNetCorePublishSettings
|
var settings = new DotNetCorePublishSettings
|
||||||
{
|
{
|
||||||
|
@ -301,7 +305,7 @@ private void ExperimentalPublish(string framework, string runtime)
|
||||||
OutputDirectory = $"./BuildOutput/Experimental/{framework}/{runtime}/Jackett"
|
OutputDirectory = $"./BuildOutput/Experimental/{framework}/{runtime}/Jackett"
|
||||||
};
|
};
|
||||||
|
|
||||||
DotNetCorePublish("./src/Jackett.Server/Jackett.Server.csproj", settings);
|
DotNetCorePublish(projectPath, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -310,7 +314,6 @@ private void ExperimentalPublish(string framework, string runtime)
|
||||||
|
|
||||||
Task("Default")
|
Task("Default")
|
||||||
.IsDependentOn("Release-Notes")
|
.IsDependentOn("Release-Notes")
|
||||||
.IsDependentOn("Experimental")
|
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
Information("Default Task Completed");
|
Information("Default Task Completed");
|
||||||
|
|
Loading…
Reference in a new issue