-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
61 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
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,5 @@ | ||
## 0.0.1 (Unreleased) | ||
|
||
Core: | ||
|
||
- Some new stuff changed |
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,42 @@ | ||
#!/bin/bash | ||
|
||
# Define the version you want to extract | ||
target_version=$1 | ||
|
||
if [ -z "$target_version" ]; then | ||
echo "Target version is empty" | ||
exit 1 | ||
fi | ||
|
||
# Input changelog file | ||
changelog_file="CHANGELOG.md" | ||
|
||
# Output markdown file | ||
output_file="Release_${target_version}.md" | ||
|
||
# Function to add entries to the markdown file | ||
add_entry() { | ||
echo -e "$1" | ||
} | ||
|
||
# Flag to start processing when the target version is found | ||
found_version=false | ||
|
||
# Read the changelog file line by line | ||
while IFS= read -r line; do | ||
# Check if the line starts with the target version | ||
if [[ $line == "## $target_version"* ]]; then | ||
echo $line | ||
found_version=true | ||
continue | ||
elif [[ $line == "##"* ]]; then | ||
# We moved to another version, stop processing | ||
found_version=false | ||
fi | ||
|
||
# If we've found the target version, start processing entries | ||
if [ "$found_version" = true ]; then | ||
# Add the current entry to the markdown file | ||
add_entry "$line" | ||
fi | ||
done < "$changelog_file" |