Skip to content

Commit

Permalink
refactor(ci): Enhance CHANGELOG management to remove duplicate entries
Browse files Browse the repository at this point in the history
- Implement function to remove duplicate lines within each CHANGELOG
entry
- Apply deduplication to existing entries and new updates
- Preserve original order of items after deduplication
- Maintain Mountain Time conversion and single Full Changelog link per
entry

This update improves the quality and readability of our CHANGELOG by
eliminating redundant information. It addresses the issue of duplicate
items within entries, ensuring a cleaner and more concise project
history.
The change affects both existing entries and future updates, providing
a consistent and streamlined changelog format moving forward.
  • Loading branch information
joshuadanpeterson committed Jul 6, 2024
1 parent f7291fb commit 9375d4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ jobs:
echo
}
remove_duplicates() {
echo "$1" | awk '!seen[$0]++'
}
echo "# Changelog" > temp_changelog.md
echo >> temp_changelog.md
Expand All @@ -163,6 +167,9 @@ jobs:
# Remove all existing Full Changelog links
content=$(echo "$content" | sed '/^\[Full Changelog\]/d')
# Remove duplicate lines
content=$(remove_duplicates "$content")
# Trim leading and trailing whitespace
content=$(echo "$content" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
Expand Down

0 comments on commit 9375d4e

Please sign in to comment.