Skip to content

Commit

Permalink
fix: Use correct release suffix for older macOS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaderbug committed May 1, 2024
1 parent a219153 commit 0b1053b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions GodotEnv/src/features/godot/models/MacOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ public MacOS(IFileClient fileClient, IComputer computer)
)
);

public override string GetInstallerNameSuffix(bool isDotnetVersion, SemanticVersion version) =>
$"{(isDotnetVersion ? "_mono" : "")}_{(int.Parse(version.Major) == 3 ? "osx" : "macos")}.universal";
public override string GetInstallerNameSuffix(bool isDotnetVersion, SemanticVersion version) {
var major = int.Parse(version.Major);
var minor = int.Parse(version.Minor);
var patch = int.Parse(version.Patch);
var hasUniversalSuffix = major > 3 || (major == 3 && minor > 3 && patch > 2);
var universalSuffix = hasUniversalSuffix ? ".universal" : ".64";

return $"{(isDotnetVersion ? "_mono" : "")}_{(major == 3 ? "osx" : "macos")}{universalSuffix}";
}

public override void Describe(ILog log) => log.Info("🍏 Running on macOS");

Expand Down

0 comments on commit 0b1053b

Please sign in to comment.