Added a build command for local Flatpak builds (#1220)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-23 09:46:12 +01:00
1 parent 2772612c00
commit 37e6161ccc
11 files changed
+1353 -8

No files matched your search

+9 -3
View File
@@ -23,17 +23,23 @@ var rootCommand = new Command("build-script", "Build, check, and release MindWor
CollectI18NKeysCommand.CreateCommand(),
AssistantPluginHashCommand.CreateCommand(),
VerifyModelsCommand.CreateCommand(),
VerifyCommand.CreateCommand()
VerifyCommand.CreateCommand(),
FlatpakCommand.CreateCommand()
};
//
// A command which fails deep inside, e.g., the build within a release, ends the whole script through
// a CommandExitedException, once it has said why. System.CommandLine would print that exception with
// its stack trace, so we handle the exceptions ourselves and print only those nobody expected:
// its stack trace, so we handle the exceptions ourselves and print only those nobody expected.
//
// System.CommandLine would also answer Ctrl+C by cancelling a token and ending the script two seconds
// later, whether the command has finished or not. No command reads that token, and the command flatpak
// needs longer to remove its container and volume. Without the timeout, Ctrl+C ends a command at once,
// unless the command handles Ctrl+C itself, as flatpak does:
//
try
{
return await rootCommand.Parse(args).InvokeAsync(new InvocationConfiguration { EnableDefaultExceptionHandler = false });
return await rootCommand.Parse(args).InvokeAsync(new InvocationConfiguration { EnableDefaultExceptionHandler = false, ProcessTerminationTimeout = null });
}
catch (CommandExitedException exception)
{