blob: 202b59d2cc668f6434dd8bf194ddab05101dd92d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/*
* Copyright (c) 2021, Mahmoud Mandour <ma.mandourr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/String.h>
#include <LibCore/System.h>
#include <LibCore/Version.h>
namespace Core::Version {
ErrorOr<String> read_long_version_string()
{
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);
}
}
|