Skip to content

Commit

Permalink
toggle for opening release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Dec 28, 2024
1 parent fea5a08 commit 9224ee1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Bloxstrap/Installer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Bloxstrap
{
internal class Installer
{
/// <summary>
/// Should this version automatically open the release notes page?
/// Recommended for major updates only.
/// </summary>
private const bool OpenReleaseNotes = false;

private static string DesktopShortcut => Path.Combine(Paths.Desktop, $"{App.ProjectName}.lnk");

private static string StartMenuShortcut => Path.Combine(Paths.WindowsStartMenu, $"{App.ProjectName}.lnk");
Expand Down Expand Up @@ -600,7 +606,10 @@ public static void HandleUpgrade()

if (isAutoUpgrade)
{
Utilities.ShellExecute($"https://github.com/{App.ProjectRepository}/wiki/Release-notes-for-Bloxstrap-v{currentVer}");
#pragma warning disable CS0162 // Unreachable code detected
if (OpenReleaseNotes)
Utilities.ShellExecute($"https://github.com/{App.ProjectRepository}/wiki/Release-notes-for-Bloxstrap-v{currentVer}");
#pragma warning restore CS0162 // Unreachable code detected
}
else
{
Expand Down

0 comments on commit 9224ee1

Please sign in to comment.