extension_ci: Improve behavior when no Rust is present (#43953)

Release Notes:

- N/A
This commit is contained in:
Finn Evers
2025-12-01 23:58:15 +01:00
committed by GitHub
parent 0bb1c6ad3e
commit bd79edee71
2 changed files with 24 additions and 28 deletions

View File

@@ -114,21 +114,21 @@ jobs:
run: |
OLD_VERSION="${{ needs.check_bump_needed.outputs.current_version }}"
cat <<EOF > .bumpversion.cfg
[bumpversion]
current_version = "$OLD_VERSION"
if [[ -f "extension.toml" ]]; then
EXTENSION_TOML="extension.toml"
fi
[bumpversion:file:Cargo.toml]
if [[ -f "Cargo.toml" ]]; then
CARGO_TOML="Cargo.toml"
fi
[bumpversion:file:extension.toml]
bump2version --verbose --current-version "$OLD_VERSION" --no-configured-files ${{ inputs.bump-type }} "$EXTENSION_TOML" "$CARGO_TOML"
EOF
if [[ -f "Cargo.toml" ]]; then
cargo update --workspace
fi
bump2version --verbose ${{ inputs.bump-type }}
NEW_VERSION="$(sed -n 's/version = \"\(.*\)\"/\1/p' < extension.toml)"
cargo update --workspace
rm .bumpversion.cfg
echo "new_version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
shell: bash -euxo pipefail {0}