Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for pre v1 branch modifiers #526

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BLAZAM/BLAZAM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>1.0.1</AssemblyVersion>
<Version>2024.08.30.2118</Version>
<Version>2024.08.31.2028</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand Down
11 changes: 7 additions & 4 deletions BLAZAMUpdate/Services/UpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,21 @@ private async Task SetBranch()
{
using var context = await _dbFactory.CreateDbContextAsync();
SelectedBranch = context.AppSettings.FirstOrDefault()?.UpdateBranch;
if (!SelectedBranch.StartsWith("v1"))
if (SelectedBranch.Equals(ApplicationReleaseBranches.Stable, StringComparison.InvariantCultureIgnoreCase))
{
var branch = SelectedBranch.Split("-")[1];
return;
}
if (SelectedBranch.Equals("Stable", StringComparison.InvariantCultureIgnoreCase))
{
SelectedBranch = ApplicationReleaseBranches.Stable;

SelectedBranch = "v1-" + branch;
context.AppSettings.FirstOrDefault().UpdateBranch = SelectedBranch;
await context.SaveChangesAsync();
}
}
catch (Exception ex)
{
Loggers.DatabaseLogger.Error("Error getting update branch from database {@Error}", ex);
Loggers.DatabaseLogger.Warning("Error getting update branch from database {@Error}", ex);

}
}
Expand Down
Loading