Skip to content

Commit

Permalink
Fix the finalize commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Jun 9, 2024
1 parent 2c7efe7 commit 756b422
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/reissue/rake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ def define
desc "Finalize the changelog for an unreleased version to set the release date."
task "#{name}:finalize", [:date] do |task, args|
date = args[:date] || Time.now.strftime("%Y-%m-%d")
Reissue.finalize(date, changelog_file:)
version, date = Reissue.finalize(date, changelog_file:)
finalize_message = "Finalize the changelog for version #{version} on #{date}"
if commit_finalize
system("git add -u")
system("git commit -m 'Finalize the changelog for version '")
system("git commit -m '#{finalize_message}'")
else
system("echo '#{finalize_message}'")
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/reissue/version_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def call(segment, version_file: @version_file)
def update(segment)
version_file = File.read(@version_file)
@updated_body = version_file.gsub(version_regex) do |string|
@original_version = Gem::Version.new(string)
@new_version = Gem::Version.new(string).redo(segment).to_s
@original_version = ::Gem::Version.new(string)
@new_version = ::Gem::Version.new(string).redo(segment).to_s
end
@new_version
end
Expand Down

0 comments on commit 756b422

Please sign in to comment.