mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
Refactoring script: Copy common/cros_async to cros_async
The copy is going to be used by crosvm going forward, while the old version will eventually be moved to ChromeOS. See go/future-of-sys-util for details BUG=b:22320646 TEST=presubmit Change-Id: Ic3216855fc244e366423160464dc722a04dfc56d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3533607 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
9317c41ed7
commit
dca90f49bd
2 changed files with 7 additions and 2 deletions
4
common/cros_async/DEPRECATED.md
Normal file
4
common/cros_async/DEPRECATED.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
Use crosvm/cros_async instead.
|
||||
|
||||
Code in this directory is not used by crosvm, it is only used in ChromeOS and will move to a
|
||||
separate ChromeOS repository soon.
|
|
@ -64,7 +64,7 @@ def move_crate(from_path: Path, to_path: Path):
|
|||
print(f"{from_path} -> {to_path}")
|
||||
if to_path.exists():
|
||||
shutil.rmtree(to_path)
|
||||
subprocess.check_call(["git", "mv", str(from_path), str(to_path)])
|
||||
shutil.copytree(str(from_path), str(to_path))
|
||||
update_path_deps(to_path / "Cargo.toml", from_path, to_path)
|
||||
replace_in_files("**/*/Cargo.toml", [(str(from_path), str(to_path))])
|
||||
replace_in_file(Path("Cargo.toml"), str(from_path), str(to_path))
|
||||
|
@ -91,7 +91,8 @@ def update_workspace_members():
|
|||
def main():
|
||||
os.chdir(Path(__file__).parent.parent.parent)
|
||||
|
||||
move_crate(Path("common/base"), Path("base"))
|
||||
move_crate(Path("common/cros_async"), Path("cros_async"))
|
||||
replace_in_file(Path("cros_async/Cargo.toml"), "[workspace]", "")
|
||||
update_workspace_members()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue