Skip to content

Commit

Permalink
VCI-798: Remove obsolete targets
Browse files Browse the repository at this point in the history
  • Loading branch information
krankenbro committed Mar 12, 2024
1 parent f10f886 commit 83657f4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 37 deletions.
11 changes: 1 addition & 10 deletions src/VirtoCommerce.Build/Cloud/Build.SaaS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ internal partial class Build

[Parameter("Organization name", Name = "Organization")] public string SaaSOrganizationName { get; set; }

public Target WaitForStatus => _ => _
.Executes(() => Log.Warning("Target WaitForStatus is obsolete. Use CloudEnvStatus."))
.Triggers(CloudEnvStatus);
public Target CloudEnvStatus => _ => _
.Executes(async () =>
{
Expand All @@ -91,9 +88,6 @@ internal partial class Build
Assert.True(isSuccess, $"Statuses {HealthStatus} {SyncStatus} were not obtained for the number of attempts: {AttemptsNumber}");
});

public Target SetEnvParameter => _ => _
.Executes(() => Log.Warning("Target SetEnvParameter is obsolete. Use CloudEnvSetParameter."))
.Triggers(CloudEnvSetParameter);

public Target CloudEnvSetParameter => _ => _
.Executes(async () =>
Expand All @@ -109,9 +103,6 @@ internal partial class Build

await cloudClient.UpdateEnvironmentAsync(env);
});
public Target UpdateCloudEnvironment => _ => _
.Executes(() => Log.Warning("Target UpdateCloudEnvironment is obsolete. Use CloudEnvUpdate."))
.Triggers(CloudEnvUpdate);

public Target CloudEnvUpdate => _ => _
.Executes(async () =>
Expand Down Expand Up @@ -360,7 +351,7 @@ private void SaveCloudToken(string token)
DbProvider = DbProvider,
DbName = DbName
};

var cloudClient = CreateVirtocloudClient(CloudUrl, await GetCloudTokenAsync());
await cloudClient.EnvironmentsCreateAsync(model);
});
Expand Down
27 changes: 0 additions & 27 deletions src/VirtoCommerce.Build/PlatformTools/Build.InitPlatform.cs

This file was deleted.

16 changes: 16 additions & 0 deletions src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ internal partial class Build

[Parameter("Backup file path")] public static AbsolutePath BackupFile { get; set; } = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());

[Parameter("Modules discovery path")]
public static string DiscoveryPath { get; set; }

[Parameter("Probing path")]
public static AbsolutePath ProbingPath { get; set; } = RootDirectory / "app_data" / "modules";

[Parameter("appsettings.json path")]
public static AbsolutePath AppsettingsPath { get; set; } = RootDirectory / "appsettings.json";

public Target InitPlatform => _ => _
.Executes(() =>
{
var configuration = AppSettings.GetConfiguration(RootDirectory, AppsettingsPath);
LocalModuleCatalog.GetCatalog(DiscoveryPath.EmptyToNull() ?? configuration.GetModulesDiscoveryPath(), ProbingPath);
});

public Target Init => _ => _
.Executes(async () =>
{
Expand Down

0 comments on commit 83657f4

Please sign in to comment.