Skip to content

Commit

Permalink
Fix create release notes script (kuskoman#370)
Browse files Browse the repository at this point in the history
Change script, so that v1 and v2 will be taked into account separately
  • Loading branch information
kuskoman authored Oct 9, 2024
1 parent 2b5a41a commit 1e60b12
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions scripts/create_release_notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ else
previous_tag_hash=$(git rev-list --tags --max-count=1)
fi

previous_tag=$(git describe --abbrev=0 --tags $previous_tag_hash)
previous_tag=$(git describe --abbrev=0 --tags "$previous_tag_hash")


range="$previous_tag..HEAD"

commits_since_previous_tag=$(git log --no-merges --pretty=format:"* %s" $range)
commits_since_previous_tag=$(git log --no-merges --pretty=format:"* %s" "$range")

notes_file="release_notes.txt"

if [ -z "$commits_since_previous_tag" ]; then
echo "No changes from previous release" > "$notes_file"
else
echo "Release Notes ($current_tag):" > "$notes_file"
echo "" >> "$notes_file"
echo "Since the last tag ($previous_tag), the following changes have been made:" >> "$notes_file"
echo "" >> "$notes_file"
echo "$commits_since_previous_tag" >> "$notes_file"
{
echo ""
echo "Since the last tag ($previous_tag), the following changes have been made:"
echo ""
echo "$commits_since_previous_tag"
} >> "$notes_file"
fi

0 comments on commit 1e60b12

Please sign in to comment.