aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 09701d0..e3642ac 100644
--- a/Rakefile
+++ b/Rakefile
@@ -77,6 +77,19 @@ begin
metadata = JSON.load(File.read(metadata_json))
config.project = metadata['name']
end
+
+ # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
+ require 'rbconfig'
+ if RbConfig::CONFIG['host_os'] =~ /linux/
+ task :changelog do
+ puts 'Fixing line endings...'
+ changelog_file = File.join(__dir__, 'CHANGELOG.md')
+ changelog_txt = File.read(changelog_file)
+ new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
+ File.open(changelog_file, "w") {|file| file.puts new_contents }
+ end
+ end
+
rescue LoadError
end
# vim: syntax=ruby