mirror of https://github.com/abpframework/abp.git
Browse Source
CLI: Create `switch-to-prerc` command to only update npm packages to pre-rc versions.pull/18693/head
committed by
GitHub
4 changed files with 147 additions and 42 deletions
@ -0,0 +1,45 @@ |
|||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Cli.Args; |
||||
|
using Volo.Abp.Cli.ProjectModification; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
|
namespace Volo.Abp.Cli.Commands; |
||||
|
|
||||
|
public class SwitchToPreRcCommand : IConsoleCommand, ITransientDependency |
||||
|
{ |
||||
|
public const string Name = "switch-to-prerc"; |
||||
|
|
||||
|
private readonly PackagePreviewSwitcher _packagePreviewSwitcher; |
||||
|
|
||||
|
public SwitchToPreRcCommand(PackagePreviewSwitcher packagePreviewSwitcher) |
||||
|
{ |
||||
|
_packagePreviewSwitcher = packagePreviewSwitcher; |
||||
|
} |
||||
|
|
||||
|
public async Task ExecuteAsync(CommandLineArgs commandLineArgs) |
||||
|
{ |
||||
|
await _packagePreviewSwitcher.SwitchToPreRc(commandLineArgs); |
||||
|
} |
||||
|
|
||||
|
public string GetUsageInfo() |
||||
|
{ |
||||
|
var sb = new StringBuilder(); |
||||
|
|
||||
|
sb.AppendLine(""); |
||||
|
sb.AppendLine("Usage:"); |
||||
|
sb.AppendLine(" abp switch-to-prerc [options]"); |
||||
|
sb.AppendLine(""); |
||||
|
sb.AppendLine("Options:"); |
||||
|
sb.AppendLine("-d|--directory"); |
||||
|
sb.AppendLine(""); |
||||
|
sb.AppendLine("See the documentation for more info: https://docs.abp.io/en/abp/latest/CLI"); |
||||
|
|
||||
|
return sb.ToString(); |
||||
|
} |
||||
|
|
||||
|
public string GetShortDescription() |
||||
|
{ |
||||
|
return "Switches npm packages to pre-rc ABP version."; |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue