diff options
author | Jordan R Abrahams-Whitehead <ajordanr@google.com> | 2023-07-25 00:24:00 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-07-25 18:27:22 +0000 |
commit | 9cf98be57924bb71c308f79420367f7806f5211d (patch) | |
tree | 2e637061ab0bc5562f7c7c1c202512686babe620 | |
parent | fb6db883cd20da1aa7433b71a394b66ce59212b8 (diff) | |
download | toolchain-utils-9cf98be57924bb71c308f79420367f7806f5211d.tar.gz |
llvm_tools: Get manifest_path from update_chromeos_manifest
We'll need the manifest path later for git operations, as
manifest_utils.py does not handle any git commands itself.
update_chromeos_llvm_hash.py apparently does not test whether
the manifest_path actually is added to the CL.
BUG=None
TEST=CQ
Change-Id: Iea4a5443c8012db4c15161df01dd5da498aaba98
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/4713965
Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
-rw-r--r-- | llvm_tools/manifest_utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm_tools/manifest_utils.py b/llvm_tools/manifest_utils.py index bae35838..83d0ca9d 100644 --- a/llvm_tools/manifest_utils.py +++ b/llvm_tools/manifest_utils.py @@ -31,7 +31,7 @@ class UpdateManifestError(Exception): pass -def update_chromeos_manifest(revision: str, src_tree: Path): +def update_chromeos_manifest(revision: str, src_tree: Path) -> Path: """Replaces the manifest project revision with 'revision'. Notably, this function reformats the manifest file to preserve @@ -41,6 +41,9 @@ def update_chromeos_manifest(revision: str, src_tree: Path): revision: Revision (git sha) to use in the manifest. src_tree: Path to the root of the source tree checkout. + Returns: + The manifest path. + Post: The llvm-project revision info in the chromeos repo manifest is updated with 'revision'. @@ -58,6 +61,7 @@ def update_chromeos_manifest(revision: str, src_tree: Path): with atomic_write_file.atomic_write(manifest_path, mode="wb") as f: xmltree.write(f, encoding="UTF-8") format_manifest(manifest_path) + return manifest_path def get_chromeos_manifest_path(src_tree: Path) -> Path: |