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

Add beta release capability #183

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
7 changes: 6 additions & 1 deletion Builders/LinuxBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ public LinuxBuilder(string version)
{
stagingTarget = Path.Combine(Program.StagingPath, app_dir);
publishTarget = Path.Combine(stagingTarget, "usr", "bin");

RuntimeIdentifier = $"{os_name}-x64";

if (Program.PhotonRelease)
RuntimeIdentifier += "-photon";
}

protected override string TargetFramework => "net8.0";
protected override string RuntimeIdentifier => $"{os_name}-x64";
protected override string RuntimeIdentifier { get; }

public override Uploader CreateUploader()
{
Expand Down
3 changes: 3 additions & 0 deletions Builders/MacOSBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public MacOSBuilder(string version, string? arch)

RuntimeIdentifier = $"{os_name}-{arch}";

if (Program.PhotonRelease)
RuntimeIdentifier += "-photon";

stagingTarget = Path.Combine(Program.StagingPath, app_dir);
publishTarget = Path.Combine(stagingTarget, "Contents", "MacOS");
}
Expand Down
2 changes: 1 addition & 1 deletion Builders/WindowsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class WindowsBuilder : Builder
{
private const string app_name = "osu!.exe";
private const string os_name = "win";
private const string channel = "win";
private readonly string channel = Program.PhotonRelease ? "win-photon" : "win";

public WindowsBuilder(string version)
: base(version)
Expand Down
4 changes: 4 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ internal static class Program
public static string? AppleKeyChainPath => ConfigurationManager.AppSettings["AppleKeyChainPath"];

public static bool IncrementVersion => bool.Parse(ConfigurationManager.AppSettings["IncrementVersion"] ?? "true");
public static bool PhotonRelease => bool.Parse(ConfigurationManager.AppSettings["PhotonRelease"] ?? "false");

public static string SolutionPath { get; private set; } = null!;

Expand Down Expand Up @@ -97,6 +98,9 @@ public static void Main(string[] args)
if (args.Length > 2 && !string.IsNullOrEmpty(args[2]))
Enum.TryParse(args[2], true, out targetPlatform);

if (PhotonRelease)
version += "-photon";

Console.ResetColor();
Console.WriteLine($"Increment Version: {IncrementVersion}");
Console.WriteLine($"Signing Certificate: {WindowsCodeSigningMetadataPath}");
Expand Down
Loading