From 9c4e16088cd4a1c5a182ba5e2fbba994400b1aa2 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Tue, 2 Dec 2025 00:38:05 +0100 Subject: [PATCH] extension_ci: Use more robust bash syntax for `bump_extension_version` (#43955) Also does some more cleanup here and there. Release Notes: - N/A --- .github/workflows/extension_bump.yml | 9 +++------ tooling/xtask/src/tasks/workflows/extension_bump.rs | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/extension_bump.yml b/.github/workflows/extension_bump.yml index 0ea88b6805a3e8609d99e18ab13bcf872e24d108..4781014e32f01b473b3358f2a81a3613fe5cdce9 100644 --- a/.github/workflows/extension_bump.yml +++ b/.github/workflows/extension_bump.yml @@ -114,15 +114,12 @@ jobs: run: | OLD_VERSION="${{ needs.check_bump_needed.outputs.current_version }}" - if [[ -f "extension.toml" ]]; then - EXTENSION_TOML="extension.toml" - fi - + BUMP_FILES=("extension.toml") if [[ -f "Cargo.toml" ]]; then - CARGO_TOML="Cargo.toml" + BUMP_FILES+=("Cargo.toml") fi - bump2version --verbose --current-version "$OLD_VERSION" --no-configured-files ${{ inputs.bump-type }} "$EXTENSION_TOML" "$CARGO_TOML" + bump2version --verbose --current-version "$OLD_VERSION" --no-configured-files ${{ inputs.bump-type }} "${BUMP_FILES[@]}" if [[ -f "Cargo.toml" ]]; then cargo update --workspace diff --git a/tooling/xtask/src/tasks/workflows/extension_bump.rs b/tooling/xtask/src/tasks/workflows/extension_bump.rs index c177f98f2784b149932251bb248eac7b0925f3d3..356a3c6c782330528c165ebafb54ca23252e35b4 100644 --- a/tooling/xtask/src/tasks/workflows/extension_bump.rs +++ b/tooling/xtask/src/tasks/workflows/extension_bump.rs @@ -242,15 +242,12 @@ fn bump_version(current_version: &JobOutput, bump_type: &WorkflowInput) -> (Step indoc! {r#" OLD_VERSION="{}" - if [[ -f "extension.toml" ]]; then - EXTENSION_TOML="extension.toml" - fi - + BUMP_FILES=("extension.toml") if [[ -f "Cargo.toml" ]]; then - CARGO_TOML="Cargo.toml" + BUMP_FILES+=("Cargo.toml") fi - bump2version --verbose --current-version "$OLD_VERSION" --no-configured-files {} "$EXTENSION_TOML" "$CARGO_TOML" + bump2version --verbose --current-version "$OLD_VERSION" --no-configured-files {} "${{BUMP_FILES[@]}}" if [[ -f "Cargo.toml" ]]; then cargo update --workspace