Skip to content

Commit

Permalink
add changelog generator
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaffen committed Jan 30, 2023
1 parent 82e6ead commit b64fce5
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ group :linter do
gem 'rubocop-rake'
end

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Expand Down
55 changes: 55 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ GEM
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
async (2.3.1)
console (~> 1.10)
io-event (~> 1.1)
timers (~> 4.1)
async-http (0.59.5)
async (>= 1.25)
async-io (>= 1.28)
async-pool (>= 0.2)
protocol-http (~> 0.23)
protocol-http1 (~> 0.14.0)
protocol-http2 (~> 0.14.0)
traces (>= 0.8.0)
async-http-faraday (0.11.0)
async-http (~> 0.42)
faraday
async-io (1.34.3)
async
async-pool (0.3.12)
async (>= 1.25)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
bcrypt (3.1.18)
Expand Down Expand Up @@ -100,6 +119,8 @@ GEM
childprocess (4.1.0)
concurrent-ruby (1.1.10)
connection_pool (2.3.0)
console (1.16.2)
fiber-local
crass (1.0.6)
dartsass-rails (0.4.0)
railties (>= 6.0.0)
Expand All @@ -117,15 +138,31 @@ GEM
railties (>= 5.0.0)
faker (3.0.0)
i18n (>= 1.8.11, < 2)
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-http-cache (2.4.1)
faraday (>= 0.8)
faraday-net_http (3.0.2)
fast_gettext (2.2.0)
ffi (1.15.5)
fiber-local (1.0.0)
friendly_id (5.5.0)
activerecord (>= 4.0.0)
git (1.13.0)
addressable (~> 2.8)
rchardet (~> 1.8)
gitable (0.4.0)
addressable (~> 2.2, >= 2.2.7)
github_changelog_generator (1.16.4)
activesupport
async (>= 1.25.0)
async-http-faraday
faraday-http-cache
multi_json
octokit (~> 4.6)
rainbow (>= 2.2.1)
rake (>= 10.0)
globalid (1.0.1)
activesupport (>= 5.0)
hiera (3.10.0)
Expand All @@ -142,6 +179,7 @@ GEM
importmap-rails (1.1.5)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
io-event (1.1.6)
jquery-rails (4.5.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand Down Expand Up @@ -186,11 +224,21 @@ GEM
racc (~> 1.4)
nokogiri (1.13.10-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
optimist (3.0.1)
parallel (1.22.1)
parser (3.1.2.1)
ast (~> 2.4.1)
popper_js (1.16.1)
protocol-hpack (1.4.2)
protocol-http (0.24.0)
protocol-http1 (0.14.6)
protocol-http (~> 0.22)
protocol-http2 (0.14.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
public_suffix (5.0.0)
puma (6.0.0)
nio4r (~> 2.0)
Expand Down Expand Up @@ -282,6 +330,7 @@ GEM
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sassc (2.4.0)
ffi (~> 1.9)
Expand All @@ -291,6 +340,9 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
scanf (1.0.0)
selenium-webdriver (4.6.1)
childprocess (>= 0.5, < 5.0)
Expand Down Expand Up @@ -320,6 +372,8 @@ GEM
thor (1.2.1)
tilt (2.0.11)
timeout (0.3.0)
timers (4.3.5)
traces (0.8.0)
turbo-rails (1.3.2)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
Expand Down Expand Up @@ -363,6 +417,7 @@ DEPENDENCIES
friendly_id (~> 5.5.0)
git
gitable
github_changelog_generator (>= 1.16.1)
hiera-eyaml
importmap-rails
jquery-rails
Expand Down
24 changes: 24 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,27 @@ if File.file?('config/hdm.yml')
else
puts "Not loading Rails specific tasks because config/hdm.yml is missing!"
end

begin
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
config.user = 'betadots'
config.project = 'hdm'
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

0 comments on commit b64fce5

Please sign in to comment.