Update publish script.

This commit is contained in:
Jared Goodwin 2020-03-06 17:08:26 -08:00
parent a1621627a3
commit fb25461d2e
2 changed files with 3 additions and 2 deletions

View File

@ -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.

View File

@ -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