From 942e3674deb635581751ad326a0851ca4028f73f Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Thu, 5 Dec 2024 01:47:58 +0000 Subject: [PATCH] Update manifests --- examples/crate_universe_local_path/MODULE.bazel | 4 +--- examples/crate_universe_local_path/vendor_lazy_static.sh | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/crate_universe_local_path/MODULE.bazel b/examples/crate_universe_local_path/MODULE.bazel index 34fdf16a8e..33111a9d55 100644 --- a/examples/crate_universe_local_path/MODULE.bazel +++ b/examples/crate_universe_local_path/MODULE.bazel @@ -20,8 +20,6 @@ crate = use_extension( crate.from_cargo( name = "bzlmod_crates_from_cargo_workspace", cargo_lockfile = "//crates_from_workspace:Cargo.lock", - manifests = [ - "//crates_from_workspace:Cargo.toml", - ], + manifests = ["//crates_from_workspace:Cargo.toml"], ) use_repo(crate, "bzlmod_crates_from_cargo_workspace") diff --git a/examples/crate_universe_local_path/vendor_lazy_static.sh b/examples/crate_universe_local_path/vendor_lazy_static.sh index 8621b7a457..4f81d5aee4 100755 --- a/examples/crate_universe_local_path/vendor_lazy_static.sh +++ b/examples/crate_universe_local_path/vendor_lazy_static.sh @@ -12,6 +12,12 @@ elif [[ "$#" -eq 1 ]]; then path_dep_path="$1" copy_to="crates_from_workspace/$1" mkdir -p "${copy_to}" + sed_i=(sed -i) + if [[ "$(uname)" == "Darwin" ]]; then + sed_i=(sed -i '') + fi + "${sed_i[@]}" -e 's#manifests = \["//crates_from_workspace:Cargo\.toml"\],#manifests = ["//crates_from_workspace:Cargo.toml", "//crates_from_workspace:'"$1"'/Cargo.toml"],#g' WORKSPACE.bazel + "${sed_i[@]}" -e 's#manifests = \["//crates_from_workspace:Cargo\.toml"\],#manifests = ["//crates_from_workspace:Cargo.toml", "//crates_from_workspace:'"$1"'/Cargo.toml"],#g' MODULE.bazel else echo >&2 "Usage: $0 [/path/to/copy/to]" echo >&2 "If no arg is passed, a tempdir will be created"