From 52b899a49bf39df051d343102d706abc1eee2037 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 17 Mar 2026 17:44:07 +0100 Subject: [PATCH 1/4] fix: update set-git-branch for Cargo.toml only The glob when used in zenoh-c ends up considering Cargo.toml.in for updates and zenoh-c is an odd use-case, it's a CMake based project but it also uses the cargo ecosystem to build the project correctly. --- dist/set-git-branch-main.mjs | 2 +- src/set-git-branch.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/set-git-branch-main.mjs b/dist/set-git-branch-main.mjs index 4c1735e..076e0ab 100644 --- a/dist/set-git-branch-main.mjs +++ b/dist/set-git-branch-main.mjs @@ -63608,7 +63608,7 @@ async function main(input) { for (path of cargoPaths) { await setGitBranch(path, input.depsRegExp, input.depsGitUrl, input.depsBranch); if (sh("git diff", { cwd: repo, check: false })) { - sh("find . -name 'Cargo.toml*' | xargs git add", { cwd: repo }); + sh("find . -name 'Cargo.toml' | xargs git add", { cwd: repo }); sh(`git commit --message 'chore: Update git/branch ${path}'`, { cwd: repo, env: gitEnv }); if (path.endsWith("Cargo.toml")) { pathsToCheck.push(path); diff --git a/src/set-git-branch.ts b/src/set-git-branch.ts index 868b4e9..89e442d 100644 --- a/src/set-git-branch.ts +++ b/src/set-git-branch.ts @@ -65,7 +65,7 @@ export async function main(input: Input) { for (path of cargoPaths) { await cargo.setGitBranch(path, input.depsRegExp, input.depsGitUrl, input.depsBranch); if (sh("git diff", { cwd: repo, check: false })) { - sh("find . -name 'Cargo.toml*' | xargs git add", { cwd: repo }); + sh("find . -name 'Cargo.toml' | xargs git add", { cwd: repo }); sh(`git commit --message 'chore: Update git/branch ${path}'`, { cwd: repo, env: gitEnv }); if (path.endsWith("Cargo.toml")) { pathsToCheck.push(path); From 0986d5ce35ad605f597775c52dfbff699a1ca127 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 17 Mar 2026 17:48:37 +0100 Subject: [PATCH 2/4] fix: add step update zenoh-c Cargo.toml.in --- .github/workflows/merge-release-branch.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/merge-release-branch.yml b/.github/workflows/merge-release-branch.yml index 96703cf..bf32ce8 100644 --- a/.github/workflows/merge-release-branch.yml +++ b/.github/workflows/merge-release-branch.yml @@ -85,6 +85,21 @@ jobs: deps-git-url: https://github.com/eclipse-zenoh/zenoh.git deps-branch: main + - name: Update zenoh-c Cargo.toml.in CMake template + if: ${{ matrix.repo == 'eclipse-zenoh/zenoh-c' }} + run: | + cd zenoh-c + if [[ -f ci/scripts/sync-cargo-toml-in.bash ]]; then + bash ci/scripts/sync-cargo-toml-in.bash + git add Cargo.toml.in + git commit --message 'chore: Sync Cargo.toml.in' || true + fi + env: + GIT_AUTHOR_NAME: eclipse-zenoh-bot + GIT_AUTHOR_EMAIL: eclipse-zenoh-bot@users.noreply.github.com + GIT_COMMITTER_NAME: eclipse-zenoh-bot + GIT_COMMITTER_EMAIL: eclipse-zenoh-bot@users.noreply.github.com + - name: Compute branch id: compute-branch run: | From b06a363cc7ca236fad1a161b73f84913dcdef4c3 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 17 Mar 2026 17:50:02 +0100 Subject: [PATCH 3/4] chore: clean up zenoh-dissector step Update merge-release-branch to remove step specific to zenoh-dissector. It has been aligned with the rest of the zenoh ecosystem to use the 1.93.0 toolchain, so this shouldn't be necessary anymore --- .github/workflows/merge-release-branch.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/merge-release-branch.yml b/.github/workflows/merge-release-branch.yml index bf32ce8..cbdac43 100644 --- a/.github/workflows/merge-release-branch.yml +++ b/.github/workflows/merge-release-branch.yml @@ -61,20 +61,7 @@ jobs: DEBIAN_FRONTEND: noninteractive - name: Update git/branch in release branch - if: ${{ matrix.repo == 'eclipse-zenoh/zenoh-dissector' }} - uses: eclipse-zenoh/ci/set-git-branch@main - with: - version: ${{ inputs.version }} - release-branch: release/${{ inputs.version }} - repo: ${{ matrix.repo }} - github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} - toolchain: 1.93.0 - deps-pattern: zenoh.* - deps-git-url: https://github.com/eclipse-zenoh/zenoh.git - deps-branch: main - - - name: Update git/branch in release branch - if: ${{ !contains(fromJSON('["eclipse-zenoh/zenoh", "eclipse-zenoh/zenoh-pico", "eclipse-zenoh/zenoh-cpp", "eclipse-zenoh/zenoh-dissector"]'), matrix.repo) }} + if: ${{ !contains(fromJSON('["eclipse-zenoh/zenoh", "eclipse-zenoh/zenoh-pico", "eclipse-zenoh/zenoh-cpp"]'), matrix.repo) }} uses: eclipse-zenoh/ci/set-git-branch@main with: version: ${{ inputs.version }} From 860514cfb900bff4962cb5c97678455e65c3dec5 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 17 Mar 2026 18:07:54 +0100 Subject: [PATCH 4/4] chore: commit only when there are changes --- .github/workflows/merge-release-branch.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge-release-branch.yml b/.github/workflows/merge-release-branch.yml index cbdac43..6f6e579 100644 --- a/.github/workflows/merge-release-branch.yml +++ b/.github/workflows/merge-release-branch.yml @@ -76,10 +76,13 @@ jobs: if: ${{ matrix.repo == 'eclipse-zenoh/zenoh-c' }} run: | cd zenoh-c - if [[ -f ci/scripts/sync-cargo-toml-in.bash ]]; then + if [[ -f "ci/scripts/sync-cargo-toml-in.bash" ]]; then + echo "Running sync script for zenoh-c" bash ci/scripts/sync-cargo-toml-in.bash - git add Cargo.toml.in - git commit --message 'chore: Sync Cargo.toml.in' || true + if ! git diff --exit-code Cargo.toml.in > /dev/null 2>&1; then + git add Cargo.toml.in + git commit --message "chore: Sync Cargo.toml.in with Cargo.toml" + fi fi env: GIT_AUTHOR_NAME: eclipse-zenoh-bot