We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d34f14c commit 75b9a12Copy full SHA for 75b9a12
.github/workflows/release.yml
@@ -162,7 +162,13 @@ jobs:
162
# Get commits since last tag
163
LAST_TAG=${{ steps.get_tag.outputs.latest_tag }}
164
if [ "$LAST_TAG" = "v0.0.0" ]; then
165
- COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~10..HEAD)
+ # Check how many commits we have and use that as the limit
166
+ COMMIT_COUNT=$(git rev-list --count HEAD)
167
+ if [ "$COMMIT_COUNT" -gt 10 ]; then
168
+ COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~10..HEAD)
169
+ else
170
+ COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~$COMMIT_COUNT..HEAD 2>/dev/null || git log --oneline --pretty=format:"- %s")
171
+ fi
172
else
173
COMMITS=$(git log --oneline --pretty=format:"- %s" $LAST_TAG..HEAD)
174
fi
0 commit comments