add removal of obsolete plugins
This commit is contained in:
parent
c5375b661b
commit
2313c4357b
@ -17,7 +17,6 @@ using SharedLibraryCore.QueryHelper;
|
|||||||
using SharedLibraryCore.Repositories;
|
using SharedLibraryCore.Repositories;
|
||||||
using SharedLibraryCore.Services;
|
using SharedLibraryCore.Services;
|
||||||
using Stats.Dtos;
|
using Stats.Dtos;
|
||||||
using StatsWeb;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -31,7 +30,6 @@ using Microsoft.Extensions.Logging;
|
|||||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||||
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||||
using IW4MAdmin.Plugins.Stats.Client;
|
using IW4MAdmin.Plugins.Stats.Client;
|
||||||
using IW4MAdmin.Plugins.Stats.Client.Game;
|
|
||||||
using Stats.Client.Abstractions;
|
using Stats.Client.Abstractions;
|
||||||
using Stats.Client;
|
using Stats.Client;
|
||||||
using Stats.Helpers;
|
using Stats.Helpers;
|
||||||
@ -100,6 +98,7 @@ namespace IW4MAdmin.Application
|
|||||||
// do any needed housekeeping file/folder migrations
|
// do any needed housekeeping file/folder migrations
|
||||||
ConfigurationMigration.MoveConfigFolder10518(null);
|
ConfigurationMigration.MoveConfigFolder10518(null);
|
||||||
ConfigurationMigration.CheckDirectories();
|
ConfigurationMigration.CheckDirectories();
|
||||||
|
ConfigurationMigration.RemoveObsoletePlugins20210322();
|
||||||
logger.LogDebug("Configuring services...");
|
logger.LogDebug("Configuring services...");
|
||||||
services = ConfigureServices(args);
|
services = ConfigureServices(args);
|
||||||
serviceProvider = services.BuildServiceProvider();
|
serviceProvider = services.BuildServiceProvider();
|
||||||
|
@ -85,5 +85,20 @@ namespace IW4MAdmin.Application.Migration
|
|||||||
config.ManualLogPath = null;
|
config.ManualLogPath = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void RemoveObsoletePlugins20210322()
|
||||||
|
{
|
||||||
|
var files = new[] {"StatsWeb.dll", "StatsWeb.Views.dll"};
|
||||||
|
|
||||||
|
foreach (var file in files)
|
||||||
|
{
|
||||||
|
var path = Path.Join(Utilities.OperatingDirectory, "Plugins", file);
|
||||||
|
|
||||||
|
if (File.Exists(path))
|
||||||
|
{
|
||||||
|
File.Delete(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user