aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorDennis Hoppe <github@debian-solutions.de>2019-12-06 15:22:49 +0100
committerDennis Hoppe <github@debian-solutions.de>2019-12-06 15:22:49 +0100
commitd4106af027780bf3573b0ff8956caf3aa9f0e9bc (patch)
tree0c3596678b81e3241bcf8878004aed3e5160a3ce /Rakefile
parentdd8ac301ea28927fd0494d9028ff059a836080a7 (diff)
downloadpuppet-ferm-d4106af027780bf3573b0ff8956caf3aa9f0e9bc.tar.gz
puppet-ferm-d4106af027780bf3573b0ff8956caf3aa9f0e9bc.tar.bz2
modulesync 2.9.0
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