From ce5dadd386c0735ce91f111e3f666166a9e0897f Mon Sep 17 00:00:00 2001 From: Will Jones Date: Wed, 17 Jun 2026 15:22:05 -0700 Subject: [PATCH] fix(ci): allow shell pre-commit hooks in bumpversion configs (#3554) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Create release commit" workflow (`make-release-commit.yml`) has failed on its last two runs; no release tags have been created since June 4. Since this workflow creates the tag that the cargo/npm/pypi/java publish workflows trigger off of, all recent releases are effectively blocked. The workflow installs `bump-my-version` unpinned. Version `1.4.0` added a check that refuses to run `pre_commit_hooks` containing shell syntax (pipes, `&&`, `if`, variable expansion) unless `allow_shell_hooks = true` is set. Both bumpversion configs use such hooks: - `python/.bumpversion.toml` — updates `Cargo.lock` after the bump (fails first) - `.bumpversion.toml` — runs `mvn versions:set` for the Java packages The job dies at the version-bump step with: > Hook '…' contains shell syntax (pipes, redirects, or variable expansion). Set `allow_shell_hooks = true` in your configuration to enable shell execution… This sets `allow_shell_hooks = true` in both configs to restore the previous behavior. Co-authored-by: Claude Opus 4.8 (1M context) --- .bumpversion.toml | 2 ++ python/.bumpversion.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.bumpversion.toml b/.bumpversion.toml index b158fc7aa..d7bfb7de9 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -23,6 +23,8 @@ allow_dirty = true commit = true message = "Bump version: {current_version} → {new_version}" commit_args = "" +# bump-my-version >=1.4.0 rejects pre_commit_hooks containing shell syntax unless opted in. +allow_shell_hooks = true # Java maven files pre_commit_hooks = [ diff --git a/python/.bumpversion.toml b/python/.bumpversion.toml index 6fe49c85f..02d3d4cf8 100644 --- a/python/.bumpversion.toml +++ b/python/.bumpversion.toml @@ -23,6 +23,8 @@ allow_dirty = true commit = true message = "Bump version: {current_version} → {new_version}" commit_args = "" +# bump-my-version >=1.4.0 rejects pre_commit_hooks containing shell syntax unless opted in. +allow_shell_hooks = true # Update Cargo.lock after version bump pre_commit_hooks = [