Skip to content

Commit

Permalink
Create script for generating release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
kuskoman committed Feb 12, 2023
1 parent bf6e364 commit d2dfc2c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ README.md
.git
out/
tmp/
release_notes.txt
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ out/

# Temporary build files
tmp/

# Release notes temporary file
release_notes.txt
20 changes: 20 additions & 0 deletions scripts/create_release_notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Get the latest tag
last_tag=$(git describe --abbrev=0 --tags)

# Get the commit messages since the last tag
commits=$(git log $last_tag..HEAD --pretty=format:"%s")

notes_file="release_notes.txt"

if [ -z "$commits" ]; then
echo "No changes from previous release" >> "$notes_file"
else
# Write the release notes to a file
echo "Release Notes:" > "$notes_file"
echo "" >> "$notes_file"
echo "Since the last tag ($last_tag), the following changes have been made:" >> "$notes_file"
echo "" >> "$notes_file"
echo "$commits" >> "$notes_file"
fi

0 comments on commit d2dfc2c

Please sign in to comment.