From fb25461d2e76f6b5dfb101cfba8bbae19afb6907 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Fri, 6 Mar 2020 17:08:26 -0800 Subject: [PATCH] Update publish script. --- Server/API/ClientDownloadsController.cs | 4 ++-- Utilities/Publish.ps1 | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Server/API/ClientDownloadsController.cs b/Server/API/ClientDownloadsController.cs index 05cc0c65..762304ad 100644 --- a/Server/API/ClientDownloadsController.cs +++ b/Server/API/ClientDownloadsController.cs @@ -70,9 +70,9 @@ namespace Remotely.Server.API { case "Windows": { - fileName = $"Remotely_Installer-{organizationID}.exe"; - var filePath = Path.Combine(HostEnv.WebRootPath, "Downloads", $"{fileName}"); + var filePath = Path.Combine(HostEnv.WebRootPath, "Downloads", $"Remotely_Installer.exe"); fileBytes = await System.IO.File.ReadAllBytesAsync(filePath); + fileName = $"Remotely_Installer-{organizationID}.exe"; break; } // TODO: Remove after a few versions. diff --git a/Utilities/Publish.ps1 b/Utilities/Publish.ps1 index db538e72..22000221 100644 --- a/Utilities/Publish.ps1 +++ b/Utilities/Publish.ps1 @@ -78,6 +78,7 @@ Set-Content -Path "$Root\Server\CurrentVersion.txt" -Value $CurrentVersion.Trim( if ($Hostname.Length -gt 0) { Replace-LineInFile -FilePath "$Root\Desktop.Win\Services\Config.cs" -MatchPattern "public string Host " -ReplaceLineWith "public string Host { get; set; } = `"$($Hostname)`";" -MaxCount 1 Replace-LineInFile -FilePath "$Root\Desktop.Linux\Services\Config.cs" -MatchPattern "public string Host " -ReplaceLineWith "public string Host { get; set; } = `"$($Hostname)`";" -MaxCount 1 + Replace-LineInFile -FilePath "$Root\Agent.Installer.Win\ViewModels\MainWindowViewModel.cs" -MatchPattern "private string serverUrl;" -ReplaceLineWith "private string serverUrl = `"$($Hostname)`";" -MaxCount 1 } else { Write-Host "`nWARNING: No hostname parameter was specified. The server name will need to be entered manually in the desktop client.`n" -ForegroundColor DarkYellow