Make Ghostty release channel aware

Ghostty now has a release channel build configuration. Current valid
values are "tip" and "stable" but I imagine more will be added in the
future.

The release channel is inferred whether the version we specify with the
`-Dversion-string` build flag has a prerelease tag or not. If it does,
the release channel is "tip". If it doesn't, the release channel is
"stable".

This also adds a configuration to specify the release channel for
auto-updates for the macOS application.
This commit is contained in:
Mitchell Hashimoto
2024-12-20 13:52:15 -08:00
parent 0abd4ea8a2
commit 8f15f1a066
8 changed files with 89 additions and 9 deletions

View File

@@ -25,6 +25,10 @@ pub fn run(alloc: Allocator) !u8 {
try stdout.print("Ghostty {s}\n\n", .{build_config.version_string});
if (tty) try stdout.print("\x1b]8;;\x1b\\", .{});
try stdout.print("Version\n", .{});
try stdout.print(" - version: {s}\n", .{build_config.version_string});
try stdout.print(" - channel: {s}\n", .{@tagName(build_config.release_channel)});
try stdout.print("Build Config\n", .{});
try stdout.print(" - Zig version: {s}\n", .{builtin.zig_version_string});
try stdout.print(" - build mode : {}\n", .{builtin.mode});