From 1e60b12299b747a658185ef01cc7364f43b23995 Mon Sep 17 00:00:00 2001 From: Jakub Surdej Date: Wed, 9 Oct 2024 15:38:09 +0200 Subject: [PATCH] Fix create release notes script (#370) Change script, so that v1 and v2 will be taked into account separately --- scripts/create_release_notes.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/create_release_notes.sh b/scripts/create_release_notes.sh index b29df70d..c793650f 100755 --- a/scripts/create_release_notes.sh +++ b/scripts/create_release_notes.sh @@ -11,12 +11,12 @@ 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" @@ -24,8 +24,10 @@ 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