Skip to content

Commit

Permalink
bump system-commandline-hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
jyffarh committed Dec 11, 2023
1 parent acaddff commit f8a6e6a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 66 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PropertyGroup Label="Dependencies from crossroads and Launcher">
<MicrosoftExtensionsHostingVersion>7.0.1</MicrosoftExtensionsHostingVersion>
<MicrosoftExtensionsConfigurationVersion>7.0.0</MicrosoftExtensionsConfigurationVersion>
<SystemCommandLineHostingVersion>0.3.0-alpha.20574.7</SystemCommandLineHostingVersion>
<SystemCommandLineHostingVersion>0.3.0-alpha.21216.1</SystemCommandLineHostingVersion>
<TestableIOSystemIOAbstractionsWrappersVersion>19.2.69</TestableIOSystemIOAbstractionsWrappersVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.7.0</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.4</MicrosoftCodeAnalysisAnalyzersVersion>
Expand Down
8 changes: 1 addition & 7 deletions src/Crossroads.Launcher/Commands/LauncherRootCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ private async Task<int> LauncherApplicationHandler(IHost host, string args)
return 1;
}

private readonly Option argsOption = new Option<string>(new string[] { "--args" }, "Override arguments.")
{
Argument = new Argument<string>
{
Arity = ArgumentArity.ExactlyOne
}
};
private readonly Option argsOption = new Option(new[] { "--args" }, "Override arguments.", argumentType: typeof(string), arity: ArgumentArity.ExactlyOne);
}
}
91 changes: 33 additions & 58 deletions src/Crossroads/Commands/PackageCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
using System.Collections.Generic;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.IO;
using System.Threading.Tasks;

namespace Crossroads.Commands
Expand All @@ -43,78 +42,54 @@ public PackageCommand()

private readonly Option NameOption = new Option<string>(
new[] { "--name", "-n" },
description: "Set name for rebranding executable")
description: "Set name for rebranding executable")
{
IsRequired = true,
};

private readonly Option CommandOption = new Option<string>(
new[] { "--command", "-c" },
description: "Specify command to run the internal application")
private readonly Option CommandOption = new Option(
new[] { "--command", "-c" },
"Specify command to run the internal application",
argumentType: typeof(string),
arity: ArgumentArity.ExactlyOne)
{
IsRequired = true,

Argument = new Argument<string>
{
Arity = ArgumentArity.ExactlyOne
}
IsRequired = true
};

private readonly Option ArgsOption = new Option(
new[] { "--args" },
description: "Add arguments for the internal application")
{
Argument = new Argument<string>
{
Arity = ArgumentArity.ExactlyOne
}
};
new[] { "--args" },
"Add arguments for the internal application",
argumentType: typeof(string),
arity: ArgumentArity.ExactlyOne);

private readonly Option LocationOption = new Option<string>(
new[] { "--location", "-l" },
"Set the output file location of the package")
{
Argument = new Argument<string>
{
Arity = ArgumentArity.ExactlyOne
}
};
private readonly Option LocationOption = new Option(
new[] { "--location", "-l" },
"Set the output file location of the package",
argumentType: typeof(string),
arity: ArgumentArity.ExactlyOne);

private readonly Option IconOption = new Option<string>(
new[] { "--icon" },
description: "Set icon for the executable package, should be of '.ico' extension")
{
Argument = new Argument<string>
{
Arity = ArgumentArity.ExactlyOne
}
};
private readonly Option IconOption = new Option(
new[] { "--icon" },
"Set icon for the executable package, should be of '.ico' extension",
argumentType: typeof(string),
arity: ArgumentArity.ExactlyOne);

private readonly Option VersionOption = new Option<string>(
new[] { "--version" },
description: "Set version for the executable package"
private readonly Option VersionOption = new Option(
new[] { "--version" },
description: "Set version for the executable package"
);

private readonly Option IncludeOption = new Option(
new[] { "--include" },
description: "Include internal resource application to be packaged")
{
Argument = new Argument<List<string>>
{
Arity = ArgumentArity.OneOrMore
}
};
new[] { "--include" },
"Include internal resource application to be packaged",
argumentType: typeof(List<string>),
arity: ArgumentArity.OneOrMore);

private readonly Option TargetOsOption = new Option<string>(
private readonly Option TargetOsOption = new Option(
new[] { "--targetos", "-t" },
description: "Set runtime identifier for the executable package")
{
Argument = new Argument<string>
{
Arity = ArgumentArity.ExactlyOne
}
};

"Set runtime identifier for the executable package",
argumentType: typeof(string),
arity: ArgumentArity.ExactlyOne);

private async Task<int> PackageHandler(IHost host, PackageOption option)
{
Expand Down

0 comments on commit f8a6e6a

Please sign in to comment.