mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibCore: Add default version for Lagom applications
Instead of grabbing `uname -vr` on non-Serenity platforms, let's just hardcode a version. This prevents Lagom builds of applications like Shell or Ladybird from reporting their version as that of the host OS.
This commit is contained in:
parent
39e79d6f6f
commit
b7f9634f6c
2 changed files with 6 additions and 0 deletions
|
@ -12,12 +12,16 @@ namespace Core::Version {
|
|||
|
||||
ErrorOr<String> read_long_version_string()
|
||||
{
|
||||
#ifdef AK_OS_SERENITY
|
||||
auto uname = TRY(Core::System::uname());
|
||||
|
||||
auto const* version = uname.release;
|
||||
auto const* git_hash = uname.version;
|
||||
|
||||
return String::formatted("Version {} revision {}", version, git_hash);
|
||||
#else
|
||||
return String::from_utf8("Version 1.0"sv);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue