Skip to content

Commit d9765d2

Browse files
callmeiksclaude
andcommitted
fix: use grep instead of python import for version check in release workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 4978060 commit d9765d2

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ jobs:
1919
- name: Verify version matches tag
2020
run: |
2121
TAG="${GITHUB_REF#refs/tags/v}"
22-
PKG_VERSION=$(python -c "
23-
import re, pathlib
24-
text = pathlib.Path('src/tikhub/_version.py').read_text()
25-
print(re.search(r'__version__\s*=\s*[\"'\''](.*?)[\"'\'']', text).group(1))
26-
")
22+
PKG_VERSION=$(grep -oP '__version__\s*=\s*"\K[^"]+' src/tikhub/_version.py)
2723
if [ "$TAG" != "$PKG_VERSION" ]; then
2824
echo "::error::tag $TAG does not match package version $PKG_VERSION"
2925
exit 1

0 commit comments

Comments
 (0)