From 3627c822678e32684af578c7148d992cf2df9ad8 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 15:03:24 +0200 Subject: [PATCH] fix: Bump Zenoh dependencies in Cargo.toml.in --- ci/scripts/bump.bash | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ci/scripts/bump.bash b/ci/scripts/bump.bash index 6b196021b..e77d3ae1c 100644 --- a/ci/scripts/bump.bash +++ b/ci/scripts/bump.bash @@ -34,14 +34,21 @@ git commit CMakeLists.txt Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump ve # Select all package dependencies that match 'zenoh.*' and bump them to $ZENOH_VERSION zenoh_deps=$(toml get Cargo.toml dependencies | jq -r 'keys.[] | select(test("zenoh.*"))') for dep in $zenoh_deps; do - [[ -n $ZENOH_VERSION ]] && toml_set_in_place Cargo.toml "dependencies.$dep.version" "$ZENOH_VERSION" - [[ -n $ZENOH_BRANCH ]] && toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$ZENOH_BRANCH" + if [[ -n $ZENOH_VERSION ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.version" "$ZENOH_VERSION" + toml_set_in_place Cargo.toml.in "dependencies.$dep.version" "$ZENOH_VERSION" + fi + + if [[ -n $ZENOH_BRANCH ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$ZENOH_BRANCH" + toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$ZENOH_BRANCH" + fi done # Update lockfile cargo check if [[ -n $ZENOH_VERSION || -n $ZENOH_BRANCH ]]; then - git commit Cargo.toml Cargo.lock -m "chore: Bump Zenoh version to $ZENOH_VERSION" + git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump Zenoh version to $ZENOH_VERSION" else echo "info: no changes have been made to Zenoh dependencies" fi