a1331212cb
Self-hosted Minecraft modpack distribution + administration system.
- launcher/ Avalonia 12 desktop client; single-file win-x64 publish.
Microsoft auth via XboxAuthNet, manifest+SHA-1 mod sync,
portable install path, sidecar settings.
- server/ brass-sigil-server daemon (.NET 8, linux-x64). Wraps the
MC subprocess, embedded Kestrel admin panel with cookie
auth + rate limiting, RCON bridge, scheduled backups,
BlueMap CLI integration with player markers + skin proxy,
friend-side whitelist request flow, world wipe with seed
selection (keep current / random / custom).
- pack/ pack.lock.json (Modrinth + manual CurseForge entries),
data-only tweak source under tweaks/, build outputs in
overrides/ (gitignored).
- scripts/ Build-Pack / Build-Tweaks / Update-Pack / Check-Updates
plus Deploy-Brass.ps1 unified one-shot deploy with
version-bump pre-flight and daemon-state detection.
33 lines
1.3 KiB
C#
33 lines
1.3 KiB
C#
using BrassAndSigil.Server.Models;
|
|
using BrassAndSigil.Server.Services;
|
|
using Spectre.Console;
|
|
using Spectre.Console.Cli;
|
|
|
|
namespace BrassAndSigil.Server.Commands;
|
|
|
|
public sealed class SyncCommand : AsyncCommand<BaseCommandSettings>
|
|
{
|
|
public override async Task<int> ExecuteAsync(CommandContext context, BaseCommandSettings settings)
|
|
{
|
|
var config = ServerConfig.Load(settings.ConfigPath);
|
|
AnsiConsole.MarkupLine($"[bold]Syncing[/] from [blue]{config.ManifestUrl}[/]");
|
|
AnsiConsole.MarkupLine($"[grey]Target: {Path.GetFullPath(config.ServerDir)}[/]");
|
|
AnsiConsole.MarkupLine("");
|
|
|
|
var sync = new ManifestSync();
|
|
var progress = new Progress<string>(msg => AnsiConsole.MarkupLine($" [grey]{msg.EscapeMarkup()}[/]"));
|
|
try
|
|
{
|
|
var result = await sync.SyncAsync(config.ManifestUrl, config.ServerDir, progress);
|
|
AnsiConsole.MarkupLine("");
|
|
AnsiConsole.MarkupLine($"[green]✓[/] pack v{result.PackVersion} | downloaded={result.Downloaded} removed={result.Removed} client-only-skipped={result.Skipped}");
|
|
return 0;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
AnsiConsole.MarkupLine($"[red]✗[/] {ex.Message.EscapeMarkup()}");
|
|
return 1;
|
|
}
|
|
}
|
|
}
|