Skip to content

Commit dd7b2f6

Browse files
committed
chore: only require version bump for .py/.pyi/.proto changes in src/
1 parent 46fa5d4 commit dd7b2f6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/check-version-bump.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
2626
CHANGED_FILES=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")
2727
28-
if echo "$CHANGED_FILES" | grep -q "^src/"; then
28+
if echo "$CHANGED_FILES" | grep -qE "^src/.*\.(py|pyi|proto)$"; then
2929
BASE_VERSION=$(git show "$BASE_SHA:pyproject.toml" | grep "^version = " | cut -d'"' -f2)
3030
HEAD_VERSION=$(git show "$HEAD_SHA:pyproject.toml" | grep "^version = " | cut -d'"' -f2)
3131
3232
if [ "$BASE_VERSION" = "$HEAD_VERSION" ]; then
33-
echo "ERROR: Files under src/ were modified but the version in pyproject.toml was not bumped (still $HEAD_VERSION)."
33+
echo "ERROR: Source files under src/ were modified but the version in pyproject.toml was not bumped (still $HEAD_VERSION)."
3434
exit 1
3535
fi
3636
@@ -42,5 +42,5 @@ jobs:
4242
4343
echo "Version bump OK: $BASE_VERSION → $HEAD_VERSION"
4444
else
45-
echo "No src/ changes. Version bump not required."
45+
echo "No source file changes under src/. Version bump not required."
4646
fi

0 commit comments

Comments
 (0)