Browse Source

Resolved #5205: Add "--skip-cli-version-check" option to ABP CLI.

pull/5209/head
Halil İbrahim Kalkan 6 years ago
parent
commit
ee718ffb3a
  1. 6
      docs/en/CLI.md
  2. 10
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs

6
docs/en/CLI.md

@ -16,6 +16,12 @@ To update an existing installation:
dotnet tool update -g Volo.Abp.Cli
````
## Global Options
While each command may have a set of options, there are some global options those can be used with any command;
* `--skip-cli-version-check`: Skips to check the latest version of the ABP CLI. If you don't specify, it will check the latest version and shows a warning message if there is a newer version of the ABP CLI.
## Commands
Here, the list of all available commands before explaining their details:

10
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs

@ -41,9 +41,13 @@ namespace Volo.Abp.Cli
{
Logger.LogInformation("ABP CLI (https://abp.io)");
await CheckCliVersionAsync();
var commandLineArgs = CommandLineArgumentParser.Parse(args);
if (!commandLineArgs.Options.ContainsKey("skip-cli-version-check"))
{
await CheckCliVersionAsync();
}
var commandType = CommandSelector.Select(commandLineArgs);
using (var scope = ServiceScopeFactory.CreateScope())
@ -72,7 +76,7 @@ namespace Volo.Abp.Cli
var currentCliVersion = await GetCurrentCliVersion(assembly);
var updateChannel = GetUpdateChannel(currentCliVersion);
Logger.LogInformation($"Version {currentCliVersion} ({updateChannel} channel)");
Logger.LogInformation($"Version {currentCliVersion} ({updateChannel})");
try
{

Loading…
Cancel
Save