mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 05:50:27 +00:00
libghostty-vt: add semver pre info to build info
This commit is contained in:
@@ -19,18 +19,25 @@ void query_build_info() {
|
||||
size_t version_major = 0;
|
||||
size_t version_minor = 0;
|
||||
size_t version_patch = 0;
|
||||
GhosttyString version_pre = {0};
|
||||
GhosttyString version_build = {0};
|
||||
|
||||
ghostty_build_info(GHOSTTY_BUILD_INFO_VERSION_STRING, &version_string);
|
||||
ghostty_build_info(GHOSTTY_BUILD_INFO_VERSION_MAJOR, &version_major);
|
||||
ghostty_build_info(GHOSTTY_BUILD_INFO_VERSION_MINOR, &version_minor);
|
||||
ghostty_build_info(GHOSTTY_BUILD_INFO_VERSION_PATCH, &version_patch);
|
||||
ghostty_build_info(GHOSTTY_BUILD_INFO_VERSION_PRE, &version_pre);
|
||||
ghostty_build_info(GHOSTTY_BUILD_INFO_VERSION_BUILD, &version_build);
|
||||
|
||||
printf("Version: %.*s\n", (int)version_string.len, version_string.ptr);
|
||||
printf("Version major: %zu\n", version_major);
|
||||
printf("Version minor: %zu\n", version_minor);
|
||||
printf("Version patch: %zu\n", version_patch);
|
||||
if (version_pre.len > 0) {
|
||||
printf("Version pre : %.*s\n", (int)version_pre.len, version_pre.ptr);
|
||||
} else {
|
||||
printf("Version pre : (none)\n");
|
||||
}
|
||||
if (version_build.len > 0) {
|
||||
printf("Version build: %.*s\n", (int)version_build.len, version_build.ptr);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user