Skip to content

Commit

Permalink
insert automatic changelog entry at the end instead of at the start o…
Browse files Browse the repository at this point in the history
…f the list
  • Loading branch information
toy committed May 5, 2024
1 parent 12fc83d commit 66500aa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions script/livecheck
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ class Livecheck
def update_changelog
changelog = FSPath('CHANGELOG.markdown')
lines = changelog.readlines
lines.insert(4, "\n") if lines[4] =~ /^## /
lines.insert(4, changelog_entry)
i = 4
if lines[i] =~ /^## /
lines.insert(i, "\n")
else
i = i + 1 while lines[i] =~ /^\* /
end
lines.insert(i, changelog_entry)
write(changelog, lines.join(''))
end

Expand Down

0 comments on commit 66500aa

Please sign in to comment.