Skip to content

Commit 0b7896c

Browse files
committed
feat: improving the bump script
1 parent 30b917c commit 0b7896c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

scripts/bump.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ for PKG in $PACKAGES; do
1212
MANIFEST_PATH="${PKG##*:::}"
1313
DIR=$(dirname "$MANIFEST_PATH")
1414

15-
# Check if any file in the package directory changed since the last tag
16-
if git diff --quiet "$LAST_TAG"..HEAD -- "$DIR"; then
15+
# Look for release commit for this member up to the last tag
16+
RELEASE_COMMIT=$(git log --oneline --grep="^$NAME-v" --format="%H" "$LAST_TAG"..HEAD | head -n1)
17+
18+
if [[ -z "$RELEASE_COMMIT" ]]; then
19+
# No release commit found, use the latest release tag commit
20+
RELEASE_COMMIT=$(git rev-list -n 1 "$LAST_TAG")
21+
fi
22+
23+
# Check if any file in the package directory changed since the member's release commit or latest tag release
24+
if git diff --quiet "$RELEASE_COMMIT"..HEAD -- "$DIR"; then
1725
continue
1826
fi
1927

0 commit comments

Comments
 (0)