Moved the build script to System.CommandLine (#1159)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-04 14:57:37 +01:00
1 parent f0fa1411c8
commit 54c3f0b3e0
12 files changed
+232 -70

No files matched your search

+10 -5
View File
@@ -1,7 +1,3 @@
// ReSharper disable ClassNeverInstantiated.Global
// ReSharper disable UnusedType.Global
// ReSharper disable UnusedMember.Global
using SharedTools;
namespace Build.Commands;
@@ -14,7 +10,16 @@ public sealed class UpdateWebAssetsCommand
/// </summary>
private static readonly HashSet<string> SKIPPED_EXTENSIONS = new(StringComparer.OrdinalIgnoreCase) { ".br", ".gz", ".map" };
[Command("update-web", Description = "Update web assets")]
/// <summary>
/// Defines the command "update-web".
/// </summary>
public static Command CreateCommand()
{
var command = new Command("update-web", "Update web assets");
command.SetAction(_ => new UpdateWebAssetsCommand().UpdateWebAssets());
return command;
}
public void UpdateWebAssets()
{
if(!Environment.IsWorkingDirectoryValid())