Skip to content

Truly independent web browser

Meta: Build the Rust tests from a source tarball without Git

Jelle Raaijmakers4dbcf008d93f
diff --git a/Meta/CMake/revision.cmake b/Meta/CMake/revision.cmake
index bdb59b225e7..1c5ed1583db 100644
--- a/Meta/CMake/revision.cmake
+++ b/Meta/CMake/revision.cmake
@@ -1,3 +1,9 @@
+if (EXISTS "${LADYBIRD_SOURCE_DIR}/REVISION")
+ set(LADYBIRD_BUILD_HEAD "${LADYBIRD_SOURCE_DIR}/REVISION")
+ set(LADYBIRD_BUILD_HEAD_LOG "${LADYBIRD_SOURCE_DIR}/REVISION")
+ return()
+endif()
+
execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${LADYBIRD_SOURCE_DIR}" rev-parse --git-path HEAD
OUTPUT_VARIABLE LADYBIRD_BUILD_HEAD
diff --git a/Meta/Generators/merge-cargo-depfiles.py b/Meta/Generators/merge-cargo-depfiles.py
index 471f76e60f9..fc1193613ea 100755
--- a/Meta/Generators/merge-cargo-depfiles.py
+++ b/Meta/Generators/merge-cargo-depfiles.py
@@ -68,9 +68,13 @@ def escape_depfile_path(path):
def cargo_manifests():
- manifests = subprocess.check_output(
- ["git", "-C", str(LADYBIRD_SOURCE_DIR), "ls-files", "-z", "--", "Cargo.toml", "**/Cargo.toml"]
- ).split(b"\0")
+ try:
+ manifests = subprocess.check_output(
+ ["git", "-C", str(LADYBIRD_SOURCE_DIR), "ls-files", "-z", "--", "Cargo.toml", "**/Cargo.toml"],
+ stderr=subprocess.DEVNULL,
+ ).split(b"\0")
+ except (OSError, subprocess.CalledProcessError):
+ manifests = []
return {(LADYBIRD_SOURCE_DIR / Path(manifest.decode())).resolve() for manifest in manifests if manifest}