-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
34 lines (32 loc) · 1.24 KB
/
Rakefile
File metadata and controls
34 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
begin
require 'voxpupuli/rubocop/rake'
rescue LoadError
# the voxpupuli-rubocop gem is optional
end
begin
require 'github_changelog_generator/task'
rescue LoadError
# gem is missing
else
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file."
config.exclude_labels = %w[duplicate question invalid wontfix wont-fix modulesync skip-changelog github_actions]
config.user = 'OpenVoxProject'
config.project = 'packaging'
config.future_release = Gem::Specification.load("#{config.project}.gemspec").version
config.since_tag = '0.99.76' # last release from Perforce
config.exclude_tags_regex = /\A0\.\d\d\d/
config.release_branch = 'main'
end
# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
require 'rbconfig'
if RbConfig::CONFIG['host_os'].include?('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\n", "\n")
File.open(changelog_file, 'w') { |file| file.puts new_contents }
end
end
end