Add more console output. Change how build completion is detected.

This commit is contained in:
Jared 2021-04-14 13:20:13 -07:00 committed by Jared Goodwin
parent a09503408b
commit be2ae419ed
2 changed files with 5 additions and 4 deletions

View File

@ -124,7 +124,9 @@ namespace Server.Installer
}
ConsoleHelper.WriteLine($"Performing server install. GitHub User: {cliParams.GitHubUsername}. " +
$"Server URL: {cliParams.ServerUrl}. Installation Directory: {cliParams.InstallDirectory}");
$"Server URL: {cliParams.ServerUrl}. Installation Directory: {cliParams.InstallDirectory}. " +
$"Web Server: {cliParams.WebServer}. Create New Build: {cliParams.CreateNew}. " +
$"Git Reference: {cliParams.Reference}");
var serverInstaller = Services.GetRequiredService<IServerInstaller>();
await serverInstaller.PerformInstall(cliParams);

View File

@ -30,7 +30,7 @@ namespace Server.Installer.Services
public async Task PerformInstall(CliParams cliParams)
{
var latestBuild = await _githubApi.GetLatestBuildArtifact(cliParams);
var existingBuildTimestamp = latestBuild?.created_at;
var latestBuildId = latestBuild?.id;
if (cliParams.CreateNew == true)
{
@ -46,8 +46,7 @@ namespace Server.Installer.Services
ConsoleHelper.WriteLine("Build action triggered successfully. Waiting for build completion.");
while (latestBuild is null ||
latestBuild.created_at <= existingBuildTimestamp.Value)
while (latestBuild?.id == latestBuildId)
{
await Task.Delay(TimeSpan.FromMinutes(1));
ConsoleHelper.WriteLine("Waiting for GitHub build completion.");