Fixed changelog encoding & prepared re-release v26.4.1 (#745)
Build and Release / Determine run mode (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,updater, dmg) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Has been cancelled
Build and Release / Prepare & create release (push) Has been cancelled
Build and Release / Read metadata (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,updater, dmg) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,deb,updater, appimage,deb) (push) Has been cancelled
Build and Release / Publish release (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,deb,updater, appimage,deb) (push) Has been cancelled

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-04-17 19:30:13 +02:00
1 parent 7cead79245
commit 519abe4fc2
9 files changed
+80 -22

No files matched your search

@@ -10,6 +10,22 @@ public sealed partial class RustService
{
var cts = new CancellationTokenSource(TimeSpan.FromSeconds(45));
var response = await this.http.GetFromJsonAsync<UpdateResponse>("/updates/check", this.jsonRustSerializerOptions, cts.Token);
if (response == default)
{
this.logger!.LogError("Failed to check for an update: the Rust endpoint returned an empty response.");
return new UpdateResponse
{
Error = true,
UpdateIsAvailable = false,
NewVersion = string.Empty,
Changelog = string.Empty
};
}
if (response.Error)
this.logger!.LogWarning("The Rust updater reported an error while checking for updates.");
this.logger!.LogInformation($"Checked for an update: update available='{response.UpdateIsAvailable}'; error='{response.Error}'; next version='{response.NewVersion}'; changelog len='{response.Changelog.Length}'");
return response;
}
@@ -20,6 +36,8 @@ public sealed partial class RustService
{
Error = true,
UpdateIsAvailable = false,
NewVersion = string.Empty,
Changelog = string.Empty
};
}
}
@@ -16,14 +16,16 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver
private readonly SettingsManager settingsManager;
private readonly MessageBus messageBus;
private readonly RustService rust;
private readonly ILogger<UpdateService> logger;
private TimeSpan updateInterval;
public UpdateService(MessageBus messageBus, SettingsManager settingsManager, RustService rust)
public UpdateService(MessageBus messageBus, SettingsManager settingsManager, RustService rust, ILogger<UpdateService> logger)
{
this.settingsManager = settingsManager;
this.messageBus = messageBus;
this.rust = rust;
this.logger = logger;
this.messageBus.RegisterComponent(this);
this.ApplyFilters([], [ Event.USER_SEARCH_FOR_UPDATE ]);
@@ -113,6 +115,23 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver
return;
var response = await this.rust.CheckForUpdate();
if (response.Error)
{
this.logger.LogWarning("Update check failed. The updater did not return a usable result.");
if (notifyUserWhenNoUpdate)
{
SNACKBAR!.Add(TB("Failed to check for updates. Please try again later."), Severity.Error, config =>
{
config.Icon = Icons.Material.Filled.Error;
config.IconSize = Size.Large;
config.IconColor = Color.Error;
});
}
return;
}
if (response.UpdateIsAvailable)
{
// ReSharper disable RedundantAssignment