Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCI-798: Remove obsolete targets #123

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading