diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b0bbe387f..2bd3d0917 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,14 +1,14 @@ - + https://github.com/dotnet/command-line-api - 060374e56c1b2e741b6525ca8417006efb54fbd7 + 02fe27cd6a9b001c8feb7938e6ef4b3799745759 - + https://github.com/dotnet/command-line-api - 060374e56c1b2e741b6525ca8417006efb54fbd7 + 02fe27cd6a9b001c8feb7938e6ef4b3799745759 diff --git a/eng/Versions.props b/eng/Versions.props index e7eb3fdf3..04d6cde3b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -10,7 +10,7 @@ - 2.0.0-beta4.25072.1 + 2.0.0-beta4.23307.1 17.8.3 17.8.3 diff --git a/src/dotnet-sourcelink/Program.cs b/src/dotnet-sourcelink/Program.cs index 319c79aeb..3adbd9c88 100644 --- a/src/dotnet-sourcelink/Program.cs +++ b/src/dotnet-sourcelink/Program.cs @@ -59,42 +59,42 @@ private static string GetSourceLinkVersion() return attribute.InformationalVersion.Split('+').First(); } - private static RootCommand GetRootCommand() + private static CliRootCommand GetRootCommand() { - var pathArg = new Argument("path") + var pathArg = new CliArgument("path") { Description = "Path to an assembly or .pdb" }; - var authArg = new Option("--auth", "-a") + var authArg = new CliOption("--auth", "-a") { Description = "Authentication method" }; authArg.AcceptOnlyFromAmong(AuthenticationMethod.Basic); - var authEncodingArg = new Option("--auth-encoding", "-e") + var authEncodingArg = new CliOption("--auth-encoding", "-e") { CustomParser = arg => Encoding.GetEncoding(arg.Tokens.Single().Value), Description = "Encoding to use for authentication value" }; - var userArg = new Option("--user", "-u") + var userArg = new CliOption("--user", "-u") { Description = "Username to use to authenticate", Arity = ArgumentArity.ExactlyOne }; - var passwordArg = new Option("--password", "-p") + var passwordArg = new CliOption("--password", "-p") { Description = "Password to use to authenticate", Arity = ArgumentArity.ExactlyOne }; - var offlineArg = new Option("--offline") + var offlineArg = new CliOption("--offline") { Description = "Offline mode - skip validation of sourcelink URL targets" }; - var test = new Command("test", "TODO") + var test = new CliCommand("test", "TODO") { pathArg, authArg, @@ -116,25 +116,25 @@ private static RootCommand GetRootCommand() return TestAsync(path, authMethod, authEncoding, user, password, offline, parseResult, cancellationToken); }); - var printJson = new Command("print-json", "Print Source Link JSON stored in the PDB") + var printJson = new CliCommand("print-json", "Print Source Link JSON stored in the PDB") { pathArg }; printJson.SetAction((parseResult, ct) => PrintJsonAsync(parseResult.GetValue(pathArg)!, parseResult)); - var printDocuments = new Command("print-documents", "TODO") + var printDocuments = new CliCommand("print-documents", "TODO") { pathArg }; printDocuments.SetAction((parseResult, ct) => PrintDocumentsAsync(parseResult.GetValue(pathArg)!, parseResult)); - var printUrls = new Command("print-urls", "TODO") + var printUrls = new CliCommand("print-urls", "TODO") { pathArg }; printUrls.SetAction((parseResult, ct) => PrintUrlsAsync(parseResult.GetValue(pathArg)!, parseResult)); - var root = new RootCommand() + var root = new CliRootCommand() { test, printJson,