mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-23 13:33:48 +00:00
Added a build command for local Flatpak builds (#1220)
This commit is contained in:
1 parent
2772612c00
commit
37e6161ccc
11 files changed
+1353
-8
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user