Skip to content

Commit

Permalink
check versionStudio instead of version
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Aug 23, 2024
1 parent 7123aa7 commit 2e8cb16
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Bloxstrap/RobloxDeployment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ public static class RobloxDeployment
{
public const string DefaultChannel = "production";

private const string VersionStudioHash = "version-012732894899482c";

public static string BaseUrl { get; private set; } = null!;

private static readonly Dictionary<string, ClientVersion> ClientVersionCache = new();
Expand All @@ -28,10 +30,16 @@ public static class RobloxDeployment

try
{
var response = await App.HttpClient.GetAsync($"{url}/version", token);
var response = await App.HttpClient.GetAsync($"{url}/versionStudio", token);

if (!response.IsSuccessStatusCode)
throw new HttpResponseException(response);

// versionStudio is the version hash for the last MFC studio to be deployed.
// the response body should always be "version-012732894899482c".
string content = await response.Content.ReadAsStringAsync(token);
if (content != VersionStudioHash)
throw new Exception($"versionStudio response does not match (expected {VersionStudioHash}, got {content})");
}
catch (TaskCanceledException)
{
Expand Down

0 comments on commit 2e8cb16

Please sign in to comment.