mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-10 21:32:05 +00:00
Migrate to CliFx v3 (#1516)
This commit is contained in:
@@ -21,12 +21,6 @@
|
||||
<PublishMacOSBundle>false</PublishMacOSBundle>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- HACK: Disable trim warnings because they seem to break when the code contains C# 14 extension blocks -->
|
||||
<PropertyGroup>
|
||||
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
|
||||
<EnableAotAnalyzer>false</EnableAotAnalyzer>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Include="..\favicon.ico" Link="favicon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
#:package CliFx
|
||||
|
||||
using CliFx;
|
||||
using CliFx.Attributes;
|
||||
using CliFx.Binding;
|
||||
using CliFx.Infrastructure;
|
||||
|
||||
return await new CliApplicationBuilder()
|
||||
.AddCommand<PublishMacOSBundleCommand>()
|
||||
return await new CommandLineApplicationBuilder()
|
||||
.AddCommandsFromThisAssembly()
|
||||
.Build()
|
||||
.RunAsync(args);
|
||||
|
||||
[Command(Description = "Publishes the GUI app as a macOS .app bundle.")]
|
||||
public class PublishMacOSBundleCommand : ICommand
|
||||
public partial class PublishMacOSBundleCommand : ICommand
|
||||
{
|
||||
private const string BundleName = "DiscordChatExporter.app";
|
||||
private const string AppName = "DiscordChatExporter";
|
||||
@@ -21,16 +21,16 @@ public class PublishMacOSBundleCommand : ICommand
|
||||
private const string AppIconName = "AppIcon";
|
||||
|
||||
[CommandOption("publish-dir", Description = "Path to the publish output directory.")]
|
||||
public required string PublishDirPath { get; init; }
|
||||
public required string PublishDirPath { get; set; }
|
||||
|
||||
[CommandOption("icons-file", Description = "Path to the .icns icons file.")]
|
||||
public required string IconsFilePath { get; init; }
|
||||
public required string IconsFilePath { get; set; }
|
||||
|
||||
[CommandOption("full-version", Description = "Full version string (e.g. '1.2.3.4').")]
|
||||
public required string FullVersion { get; init; }
|
||||
public required string FullVersion { get; set; }
|
||||
|
||||
[CommandOption("short-version", Description = "Short version string (e.g. '1.2.3').")]
|
||||
public required string ShortVersion { get; init; }
|
||||
public required string ShortVersion { get; set; }
|
||||
|
||||
public async ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user