feat: 新增yi-abp nuget脚手架,待正式版上传
This commit is contained in:
45
Yi.Abp.Net8/tool/Yi.Abp.Tool/Program.cs
Normal file
45
Yi.Abp.Net8/tool/Yi.Abp.Tool/Program.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System.Reflection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Yi.Abp.Tool;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
IHost host = Host.CreateDefaultBuilder()
|
||||
.ConfigureServices(async (host, service) =>
|
||||
{
|
||||
await service.AddApplicationAsync<YiAbpToolModule>();
|
||||
})
|
||||
.UseAutofac()
|
||||
.Build();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
Console.WriteLine(ex.StackTrace);
|
||||
}
|
||||
|
||||
if (args.Contains("-v"))
|
||||
{
|
||||
var version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
|
||||
Console.WriteLine($"Yi-ABP CLI {version}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("""
|
||||
Usage:
|
||||
|
||||
yi-abp <command> <target> [options]
|
||||
|
||||
Command List:
|
||||
""");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user