Skip to content

Commit

Permalink
Merge branch 'release/3.21.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
krankenbro committed Feb 20, 2024
2 parents fb12f55 + 1100712 commit 098a007
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Copyright>Copyright © VirtoCommerce 2011-2022</Copyright>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>3.20.0</VersionPrefix>
<VersionPrefix>3.21.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
</PropertyGroup>
Expand Down
16 changes: 13 additions & 3 deletions src/VirtoCommerce.Build/Cloud/Build.SaaS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ 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 () =>
{
var isSuccess = false;
Expand All @@ -89,6 +92,10 @@ internal partial class Build
});

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

public Target CloudEnvSetParameter => _ => _
.Executes(async () =>
{
var cloudClient = new VirtoCloudClient(CloudUrl, await GetCloudTokenAsync());
Expand All @@ -102,8 +109,11 @@ 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 () =>
{
var cloudClient = new VirtoCloudClient(CloudUrl, await GetCloudTokenAsync());
Expand Down Expand Up @@ -259,7 +269,6 @@ private static void CopyPlatformDirectory(AbsolutePath platformDirectory, Absolu
var listener = new HttpListener() {
Prefixes = { listenerPrefix }
};
Log.Information("Start listening to {0}", listenerPrefix);
listener.Start();


Expand All @@ -270,7 +279,8 @@ private static void CopyPlatformDirectory(AbsolutePath platformDirectory, Absolu
var context = await listener.GetContextAsync();
context.Response.StatusCode = (int)HttpStatusCode.OK;
var apiKey = context.Request.QueryString["apiKey"];
context.Response.Close(Encoding.UTF8.GetBytes("You can close this browser tab now."), false);
context.Response.Redirect($"{CloudUrl}/vcbuild/login/success");
context.Response.Close();

SaveCloudToken(apiKey);
});
Expand Down

0 comments on commit 098a007

Please sign in to comment.