Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tooling/make-release-description.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ OUTPUT="RELEASE.md"

# Resolve version and previous tag
CURRENT_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0")
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")

# If the current version is a stable release (no hyphen), we want the previous tag
# to be the last stable release tag (excluding prerelease tags containing "-").
# Otherwise, we just take the immediate previous tag.
if [[ "$CURRENT_VERSION" != *"-"* ]]; then
PREV_TAG=$(git describe --tags --abbrev=0 --exclude="*-*" HEAD^ 2>/dev/null || echo "")
else
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
fi

# Collect commits since last tag (or all if first release)
if [[ -n "$PREV_TAG" ]]; then
Expand Down
Loading