mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:27:21 +00:00
Moved the build script to System.CommandLine (#1159)
This commit is contained in:
1 parent
f0fa1411c8
commit
54c3f0b3e0
12 files changed
+232
-70
No files matched your search
@@ -0,0 +1,19 @@
|
||||
namespace Build.Tools;
|
||||
|
||||
/// <summary>
|
||||
/// Ends the build script with an exit code, after the command has said what went wrong.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A release runs several commands one after another, and a failure deep inside one of them has to end
|
||||
/// the whole release, so that nothing is built on top of half-prepared metadata or broken artifacts.
|
||||
/// Program.cs turns the exception into the exit code and prints nothing more: the command already
|
||||
/// explained the failure, and a stack trace would only bury that explanation.
|
||||
/// </remarks>
|
||||
/// <param name="exitCode">The exit code of the build script, where anything but zero is a failure.</param>
|
||||
public sealed class CommandExitedException(int exitCode) : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// The exit code the build script ends with.
|
||||
/// </summary>
|
||||
public int ExitCode { get; } = exitCode;
|
||||
}
|
||||
Reference in new issue
Block a user