Skip to content

Commit

Permalink
Merge pull request #4059 from rubygems/changelog_idempotency
Browse files Browse the repository at this point in the history
Make changelog generation idempotent
  • Loading branch information
deivid-rodriguez committed Nov 16, 2020
2 parents df7d88f + abf9c65 commit fcdcfc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/changelog.rb
Expand Up @@ -83,7 +83,7 @@ def cut!
format_header,
"",
unreleased_notes,
lines,
released_notes,
].join("\n") + "\n"

File.write(@file, full_new_changelog)
Expand Down Expand Up @@ -227,7 +227,7 @@ def relevant_pull_requests_for(ids)
end

def released_notes
lines.drop_while {|line| !line.start_with?(release_section_token) }
lines.drop_while {|line| !line.start_with?(release_section_token) || !line.include?(@latest_release.tag_name.gsub(/^.*-v/, "")) }
end

def lines
Expand Down

0 comments on commit fcdcfc0

Please sign in to comment.