diff --git a/clio/Package/ApplicationInstaller.cs b/clio/Package/ApplicationInstaller.cs index b7b360d..09c584b 100644 --- a/clio/Package/ApplicationInstaller.cs +++ b/clio/Package/ApplicationInstaller.cs @@ -17,9 +17,9 @@ public class ApplicationInstaller : BasePackageInstaller, IApplicationInstaller public ApplicationInstaller(IApplicationLogProvider applicationLogProvider, EnvironmentSettings environmentSettings, IApplicationClientFactory applicationClientFactory, IApplication application, IPackageArchiver packageArchiver, ISqlScriptExecutor scriptExecutor, - IServiceUrlBuilder serviceUrlBuilder, IFileSystem fileSystem, ILogger logger) + IServiceUrlBuilder serviceUrlBuilder, IFileSystem fileSystem, ILogger logger, IPackageLockManager packageLockManager) : base(applicationLogProvider, environmentSettings, applicationClientFactory, application, - packageArchiver, scriptExecutor, serviceUrlBuilder, fileSystem, logger){ } + packageArchiver, scriptExecutor, serviceUrlBuilder, fileSystem, logger, packageLockManager) { } #endregion diff --git a/clio/Package/BasePackageInstaller.cs b/clio/Package/BasePackageInstaller.cs index e7182cf..a5784d0 100644 --- a/clio/Package/BasePackageInstaller.cs +++ b/clio/Package/BasePackageInstaller.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using System.Threading; using System; + using System.Linq; public abstract class BasePackageInstaller { @@ -28,6 +29,7 @@ public abstract class BasePackageInstaller { private readonly IPackageArchiver _packageArchiver; private readonly ISqlScriptExecutor _scriptExecutor; private readonly IServiceUrlBuilder _serviceUrlBuilder; + private readonly IPackageLockManager _packageLockManager; protected readonly ILogger _logger; private readonly IApplication _application; private string _reportPath; @@ -45,7 +47,7 @@ public abstract class BasePackageInstaller { public BasePackageInstaller(IApplicationLogProvider applicationLogProvider, EnvironmentSettings environmentSettings, IApplicationClientFactory applicationClientFactory, IApplication application, IPackageArchiver packageArchiver, ISqlScriptExecutor scriptExecutor, - IServiceUrlBuilder serviceUrlBuilder, IFileSystem fileSystem, ILogger logger) { + IServiceUrlBuilder serviceUrlBuilder, IFileSystem fileSystem, ILogger logger, IPackageLockManager packageLockManager) { environmentSettings.CheckArgumentNull(nameof(environmentSettings)); applicationClientFactory.CheckArgumentNull(nameof(applicationClientFactory)); application.CheckArgumentNull(nameof(application)); @@ -63,6 +65,7 @@ public BasePackageInstaller(IApplicationLogProvider applicationLogProvider, Envi _serviceUrlBuilder = serviceUrlBuilder; _fileSystem = fileSystem; _logger = logger; + _packageLockManager = packageLockManager; } #endregion @@ -93,8 +96,7 @@ private IApplicationClient CreateApplicationClient(EnvironmentSettings environme _applicationClientFactory.CreateClient(environmentSettings); private void UnlockMaintainerPackageInternal(EnvironmentSettings environmentSettings) { - IApplicationClient applicationClient = CreateApplicationClient(environmentSettings); - applicationClient.CallConfigurationService("CreatioApiGateway", "UnlockPackages", "{}"); + _packageLockManager.Unlock(Enumerable.Empty()); } private void SaveLogFile(string logText, string reportPath) { diff --git a/clio/Package/PackageInstaller.cs b/clio/Package/PackageInstaller.cs index 2f4ebbe..98b5b52 100644 --- a/clio/Package/PackageInstaller.cs +++ b/clio/Package/PackageInstaller.cs @@ -14,9 +14,9 @@ public class PackageInstaller : BasePackageInstaller, IPackageInstaller public PackageInstaller(IApplicationLogProvider applicationLogProvider, EnvironmentSettings environmentSettings, IApplicationClientFactory applicationClientFactory, IApplication application, IPackageArchiver packageArchiver, ISqlScriptExecutor scriptExecutor, - IServiceUrlBuilder serviceUrlBuilder, IFileSystem fileSystem, ILogger logger) + IServiceUrlBuilder serviceUrlBuilder, IFileSystem fileSystem, ILogger logger, IPackageLockManager packageLockManager) : base(applicationLogProvider, environmentSettings, applicationClientFactory, application, - packageArchiver, scriptExecutor, serviceUrlBuilder, fileSystem, logger) { + packageArchiver, scriptExecutor, serviceUrlBuilder, fileSystem, logger, packageLockManager) { } #endregion diff --git a/clio/clio.csproj b/clio/clio.csproj index 3174c04..d470ca6 100644 --- a/clio/clio.csproj +++ b/clio/clio.csproj @@ -9,7 +9,7 @@ creatio rnd team cli ATF clio creatio en - 8.0.1.6 + 8.0.1.7 $(AssemblyVersion) $(AssemblyVersion) CLI interface for Creatio