1
0
mirror of https://github.com/ONLYOFFICE/Mail.git synced 2025-04-18 16:44:01 +03:00

Add build script, update Autofac.Extensions.DependencyInjection, remove unused configs from Program.cs

This commit is contained in:
Enin Artem 2021-12-15 16:14:53 +04:00
parent d6250d8d1c
commit 28b8c7f270
8 changed files with 20 additions and 32 deletions

View File

@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Mail.StorageCleaner.Ser
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Mail.Watchdog.Service", "Services\ASC.Mail.Watchdog.Service\ASC.Mail.Watchdog.Service.csproj", "{5F332535-6B77-46C9-A4E0-0F7E91166558}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Mail.Tests", "Tests\ASC.Mail.Tests.csproj", "{4F8E5049-EE1A-4D68-B511-869B913879EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -47,10 +45,6 @@ Global
{5F332535-6B77-46C9-A4E0-0F7E91166558}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F332535-6B77-46C9-A4E0-0F7E91166558}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F332535-6B77-46C9-A4E0-0F7E91166558}.Release|Any CPU.Build.0 = Release|Any CPU
{4F8E5049-EE1A-4D68-B511-869B913879EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F8E5049-EE1A-4D68-B511-869B913879EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F8E5049-EE1A-4D68-B511-869B913879EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F8E5049-EE1A-4D68-B511-869B913879EC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -33,7 +33,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.1.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="5.0.1" />
<PackageReference Include="DotNetZip" Version="1.16.0" />
<PackageReference Include="Grpc.Tools" Version="2.27.0">

View File

@ -27,7 +27,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.1.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="6.0.0" />
<Service Include="{7080343D-FBE7-423A-9405-4F883F6E235B}" />
</ItemGroup>

View File

@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using ASC.Api.Core;
using ASC.Api.Core;
using ASC.Common;
using ASC.Common.Caching;
using ASC.Common.DependencyInjection;
@ -23,6 +16,13 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
namespace ASC.Mail.Aggregator.Service
{
class Program
@ -76,14 +76,10 @@ namespace ASC.Mail.Aggregator.Service
.AddJsonFile($"appsettings.{env}.json", true)
.AddJsonFile("storage.json")
.AddJsonFile($"storage.{env}.json")
.AddJsonFile("notify.json")
.AddJsonFile("backup.json")
.AddJsonFile("kafka.json")
.AddJsonFile("mail.json")
.AddJsonFile($"mail.{env}.json")
.AddJsonFile("elastic.json")
.AddJsonFile($"elastic.{env}.json")
.AddJsonFile($"kafka.{env}.json", true)
.AddEnvironmentVariables()
.AddCommandLine(args)
.AddInMemoryCollection(new Dictionary<string, string>

View File

@ -19,7 +19,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.1.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
<PackageReference Include="MailKit" Version="2.15.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using ASC.Api.Core;
using ASC.Api.Core;
using ASC.Common;
using ASC.Common.Caching;
using ASC.Common.DependencyInjection;
@ -18,6 +12,12 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
namespace ASC.Mail.StorageCleaner.Service
{
class Program
@ -66,8 +66,6 @@ namespace ASC.Mail.StorageCleaner.Service
config
.AddJsonFile("appsettings.json")
.AddJsonFile($"appsettings.{env}.json", true)
.AddJsonFile("kafka.json")
.AddJsonFile($"kafka.{env}.json", true)
.AddJsonFile("mail.json")
.AddJsonFile($"mail.{env}.json")
.AddJsonFile("storage.json")

View File

@ -69,8 +69,6 @@ namespace ASC.Mail.Watchdog.Service
config
.AddJsonFile("appsettings.json")
.AddJsonFile($"appsettings.{env}.json", true)
.AddJsonFile("kafka.json")
.AddJsonFile($"kafka.{env}.json", true)
.AddJsonFile("mail.json")
.AddJsonFile($"mail.{env}.json")
.AddEnvironmentVariables()

2
build/build.bat Normal file
View File

@ -0,0 +1,2 @@
PUSHD %~dp0..
dotnet build ASC.Mail.sln --configuration Release /fl1 /flp1:LogFile=build/ASC.Mail.log;Verbosity=Normal