mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
* Content.Packaging can now emit binlogs for the build I was checking why packaging is so much slower and it *seems* to be entirely the actual build being twice as slow as before .NET 10. Strange. Content.Packaging can now emit MSBuild binlogs that we can analyze to see why that's the case. * Enable --log-build on Test Packaging workflow, produce artifact with binlogs * Disable setup-dotnet in packaging workflow I have a suspicion...
50 lines
1.1 KiB
C#
50 lines
1.1 KiB
C#
using Content.Packaging;
|
|
using Robust.Packaging;
|
|
|
|
IPackageLogger logger = new PackageLoggerConsole();
|
|
|
|
if (!CommandLineArgs.TryParse(args, out var parsed))
|
|
{
|
|
logger.Error("Unable to parse args, aborting.");
|
|
return;
|
|
}
|
|
|
|
if (parsed.WipeRelease)
|
|
WipeRelease();
|
|
else
|
|
{
|
|
// Ensure the release directory exists. Otherwise, the packaging will fail.
|
|
Directory.CreateDirectory("release");
|
|
}
|
|
|
|
if (!parsed.SkipBuild)
|
|
WipeBin();
|
|
|
|
if (parsed.Client)
|
|
{
|
|
await ClientPackaging.PackageClient(parsed.SkipBuild, parsed.LogBuild, parsed.Configuration, logger);
|
|
}
|
|
else
|
|
{
|
|
await ServerPackaging.PackageServer(parsed.SkipBuild, parsed.HybridAcz, parsed.LogBuild, logger, parsed.Configuration, parsed.Platforms);
|
|
}
|
|
|
|
void WipeBin()
|
|
{
|
|
logger.Info("Clearing old build artifacts (if any)...");
|
|
|
|
if (Directory.Exists("bin"))
|
|
Directory.Delete("bin", recursive: true);
|
|
}
|
|
|
|
void WipeRelease()
|
|
{
|
|
if (Directory.Exists("release"))
|
|
{
|
|
logger.Info("Cleaning old release packages (release/)...");
|
|
Directory.Delete("release", recursive: true);
|
|
}
|
|
|
|
Directory.CreateDirectory("release");
|
|
}
|