Pack Impostor.Api in build process

This commit is contained in:
AeonLucid committed 2020-10-24 21:02:10 +02:00
1 parent a36396fb48
commit 9b5249cbb3
2 files changed
+15 -7

No files matched your search

+1
View File
@@ -31,6 +31,7 @@ test: off
artifacts: artifacts:
- path: ./build/*.zip - path: ./build/*.zip
- path: ./build/*.nupkg
only_commits: only_commits:
files: files:
+14 -7
View File
@@ -25,7 +25,7 @@ private void ImpostorClean(string directory) {
} }
} }
private void ImpostorPublish(string name, string project, string runtime) { private void ImpostorPublish(string name, string project, string runtime, bool selfContained = true) {
var projBuildDir = buildDir.Combine(name + "_" + runtime); var projBuildDir = buildDir.Combine(name + "_" + runtime);
var projBuildZip = buildDir.CombineWithFilePath(name + "_" + buildVersion + "_" + runtime + ".zip"); var projBuildZip = buildDir.CombineWithFilePath(name + "_" + buildVersion + "_" + runtime + ".zip");
@@ -34,9 +34,9 @@ private void ImpostorPublish(string name, string project, string runtime) {
NoRestore = true, NoRestore = true,
Framework = "net5.0", Framework = "net5.0",
Runtime = runtime, Runtime = runtime,
SelfContained = true, SelfContained = selfContained,
PublishSingleFile = true, PublishSingleFile = true,
PublishTrimmed = true, PublishTrimmed = selfContained,
OutputDirectory = projBuildDir OutputDirectory = projBuildDir
}); });
@@ -104,10 +104,9 @@ Task("Build")
// Client. // Client.
ImpostorPublishNF("Impostor-Patcher", "./src/Impostor.Patcher/Impostor.Patcher.WinForms/Impostor.Patcher.WinForms.csproj"); ImpostorPublishNF("Impostor-Patcher", "./src/Impostor.Patcher/Impostor.Patcher.WinForms/Impostor.Patcher.WinForms.csproj");
// Excluding these because currently it results in a ~17MB package for each. ImpostorPublish("Impostor-Patcher-Cli", "./src/Impostor.Patcher/Impostor.Patcher.Cli/Impostor.Patcher.Cli.csproj", "win-x64", false);
// ImpostorPublish("Impostor-Patcher-Cli", "./src/Impostor.Patcher/Impostor.Patcher.Cli/Impostor.Patcher.Cli.csproj", "win-x64"); ImpostorPublish("Impostor-Patcher-Cli", "./src/Impostor.Patcher/Impostor.Patcher.Cli/Impostor.Patcher.Cli.csproj", "osx-x64", false);
// ImpostorPublish("Impostor-Patcher-Cli", "./src/Impostor.Patcher/Impostor.Patcher.Cli/Impostor.Patcher.Cli.csproj", "osx-x64"); ImpostorPublish("Impostor-Patcher-Cli", "./src/Impostor.Patcher/Impostor.Patcher.Cli/Impostor.Patcher.Cli.csproj", "linux-x64", false);
// ImpostorPublish("Impostor-Patcher-Cli", "./src/Impostor.Patcher/Impostor.Patcher.Cli/Impostor.Patcher.Cli.csproj", "linux-x64");
// Server. // Server.
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "win-x64"); ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "win-x64");
@@ -115,6 +114,14 @@ Task("Build")
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-x64"); ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-x64");
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-arm"); ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-arm");
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-arm64"); ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-arm64");
// API.
DotNetCorePack("./src/Impostor.Api/Impostor.Api.csproj", new DotNetCorePackSettings {
Configuration = configuration,
OutputDirectory = buildDir,
IncludeSource = true,
IncludeSymbols = true
});
} else { } else {
DotNetCoreBuild("./src/Impostor.Patcher/Impostor.Patcher.WinForms/Impostor.Patcher.WinForms.csproj", new DotNetCoreBuildSettings { DotNetCoreBuild("./src/Impostor.Patcher/Impostor.Patcher.WinForms/Impostor.Patcher.WinForms.csproj", new DotNetCoreBuildSettings {
Configuration = configuration, Configuration = configuration,