forked from kuskoman/logstash-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create script for generating release notes
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ README.md | |
.git | ||
out/ | ||
tmp/ | ||
release_notes.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,6 @@ out/ | |
|
||
# Temporary build files | ||
tmp/ | ||
|
||
# Release notes temporary file | ||
release_notes.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |