named putput file
This commit is contained in:
parent
59f78a780d
commit
4931383fd2
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,2 @@
|
||||||
output.txt
|
|
||||||
constants.rb
|
constants.rb
|
||||||
output.md
|
*.md
|
||||||
|
|
|
@ -52,8 +52,8 @@ class ChangelogGenerator
|
||||||
if @options[:verbose]
|
if @options[:verbose]
|
||||||
puts 'Generating changelog:'
|
puts 'Generating changelog:'
|
||||||
end
|
end
|
||||||
log = '# Changelog'
|
|
||||||
|
|
||||||
|
log = "# Changelog\n\n----\n\n"
|
||||||
|
|
||||||
if @options[:last]
|
if @options[:last]
|
||||||
log += self.generate_log_between_tags(self.all_tags[0], self.all_tags[1])
|
log += self.generate_log_between_tags(self.all_tags[0], self.all_tags[1])
|
||||||
|
@ -82,8 +82,15 @@ class ChangelogGenerator
|
||||||
log += self.generate_log_for_all_tags
|
log += self.generate_log_for_all_tags
|
||||||
end
|
end
|
||||||
|
|
||||||
puts log
|
|
||||||
File.open('output.md', 'w') { |file| file.write(log) }
|
if @options[:verbose]
|
||||||
|
puts log
|
||||||
|
end
|
||||||
|
|
||||||
|
output_filename = "#{$github_repo_name}_changelog.md"
|
||||||
|
File.open(output_filename, 'w') { |file| file.write(log) }
|
||||||
|
|
||||||
|
puts "Done! Generated log placed in #{output_filename}"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user