Created
April 13, 2022 18:04
-
-
Save macro6461/2d6f8e7f536efb5e2abfdb8c89d4e47c to your computer and use it in GitHub Desktop.
This is the gist for `new_changelog_item` bash script
This file contains hidden or 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
new_changelog_item() | |
{ | |
while read line; do | |
if [[ $line == "## [Unreleased]"* ]]; then | |
newvar=$(<<<"$line" sed 's/[].*[]/\\&/g') | |
echo $newvar | |
echo "LINE FOUND IN" CHANGELOG.md | |
sed -i "" "s/$newvar/## [Unreleased]\n\n## [$version] - $date\n### Added\n - ADD CHANGE HERE!/" CHANGELOG.md | |
return | |
fi | |
done < CHANGELOG.md | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment