mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
LibCore: Remove LADYBIRD_GIT_VERSION
environment variable usage
This was previously used by the WPT runner to determine the git hash of a particular WPT run. This mechanism is no longer used, since it doesn't work with chunked WPT runs.
This commit is contained in:
parent
7f4916b806
commit
1c5881c44a
Notes:
github-actions[bot]
2025-05-15 12:03:51 +00:00
Author: https://github.com/tcl3
Commit: 1c5881c44a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4731
Reviewed-by: https://github.com/gmta ✅
1 changed files with 0 additions and 15 deletions
|
@ -5,27 +5,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <LibCore/Environment.h>
|
|
||||||
#include <LibCore/Version.h>
|
#include <LibCore/Version.h>
|
||||||
|
|
||||||
namespace Core::Version {
|
namespace Core::Version {
|
||||||
|
|
||||||
String read_long_version_string()
|
String read_long_version_string()
|
||||||
{
|
{
|
||||||
auto validate_git_hash = [](auto hash) {
|
|
||||||
if (hash.length() < 4 || hash.length() > 40)
|
|
||||||
return false;
|
|
||||||
for (auto ch : hash) {
|
|
||||||
if (!is_ascii_hex_digit(ch))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
auto maybe_git_hash = Core::Environment::get("LADYBIRD_GIT_VERSION"sv);
|
|
||||||
|
|
||||||
if (maybe_git_hash.has_value() && validate_git_hash(maybe_git_hash.value()))
|
|
||||||
return MUST(String::formatted("Version 1.0-{}", maybe_git_hash.value()));
|
|
||||||
return "Version 1.0"_string;
|
return "Version 1.0"_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue