Skip to content

Commit

Permalink
Prepare for .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsen9026 committed Jun 3, 2024
1 parent 2685150 commit 48c0143
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
24 changes: 24 additions & 0 deletions BLAZAMGui/UI/Settings/AvailableUpdate.razor
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

}
}
else if (Disabled)
{
<MudText>@DisabledMessage</MudText>
}
</MudCard>


Expand All @@ -38,6 +42,8 @@
[Parameter]
public ApplicationUpdate Update { get; set; }

private string DisabledMessage;

[Parameter]
public bool Disabled { get; set; } = false;
[Parameter]
Expand Down Expand Up @@ -126,5 +132,23 @@

private bool CurrentVersion => ApplicationInfo.RunningVersion.CompareTo(Update.Version) == 0;

protected override void OnInitialized()
{
base.OnInitialized();
if(Update.Version.NewerThan(new ApplicationVersion("0.9.99")))

Check failure on line 138 in BLAZAMGui/UI/Settings/AvailableUpdate.razor

View workflow job for this annotation

GitHub Actions / build

'ApplicationVersion' does not contain a definition for 'NewerThan' and no accessible extension method 'NewerThan' accepting a first argument of type 'ApplicationVersion' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 138 in BLAZAMGui/UI/Settings/AvailableUpdate.razor

View workflow job for this annotation

GitHub Actions / build

'ApplicationVersion' does not contain a definition for 'NewerThan' and no accessible extension method 'NewerThan' accepting a first argument of type 'ApplicationVersion' could be found (are you missing a using directive or an assembly reference?)
{
if(PrerequisiteChecker.CheckForAspCore())

Check failure on line 140 in BLAZAMGui/UI/Settings/AvailableUpdate.razor

View workflow job for this annotation

GitHub Actions / build

The name 'PrerequisiteChecker' does not exist in the current context

Check failure on line 140 in BLAZAMGui/UI/Settings/AvailableUpdate.razor

View workflow job for this annotation

GitHub Actions / build

The name 'PrerequisiteChecker' does not exist in the current context
{
Disabled=true;
DisabledMessage = AppLocalization["ASP NET Core 8 Runtime is missing."];
}
if(PrerequisiteChecker.CheckForAspCoreHosting())

Check failure on line 145 in BLAZAMGui/UI/Settings/AvailableUpdate.razor

View workflow job for this annotation

GitHub Actions / build

The name 'PrerequisiteChecker' does not exist in the current context

Check failure on line 145 in BLAZAMGui/UI/Settings/AvailableUpdate.razor

View workflow job for this annotation

GitHub Actions / build

The name 'PrerequisiteChecker' does not exist in the current context
{
Disabled=true;
DisabledMessage = AppLocalization["ASP NET Core 8 Web Hosting Bundle is missing."];

}
}
}

}
2 changes: 1 addition & 1 deletion BLAZAMUpdate/ApplicationUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ApplicationUpdate
/// <summary>
/// The version of this update
/// </summary>
public ApplicationVersion Version { get => Release.Version; }
public ApplicationVersion Version { get => Release.Version; set=>Release.Version=value; }

public string Branch { get => Release.Branch; }

Expand Down
7 changes: 7 additions & 0 deletions BLAZAMUpdate/Services/UpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ private async Task GetReleases()
LatestUpdate = latestBranchUpdate;

}
if (Debugger.IsAttached)
{
ApplicationUpdate? testUpdate = EncapsulateUpdate(latestRelease, SelectedBranch);

latestBranchUpdate.Version = new ApplicationVersion("1.0.0");
LatestUpdate = latestBranchUpdate;
}
}

/// <summary>
Expand Down

0 comments on commit 48c0143

Please sign in to comment.