Archived
1
0
Fork 0

Add changelog generator

This commit is contained in:
Braiden Vasco 2015-07-25 13:07:37 +05:00
parent 685cb9ff95
commit c670328454
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,10 @@
require 'rubygems'
gemspec = Gem::Specification.load('lita-tox.gemspec')
github_user, github_project =
gemspec.homepage.scan(%r{^https://github\.com/([^/]+)/([^/]+)/?$})[0]
require 'bundler/gem_tasks'
task default: [:spec, :lint]
@ -12,3 +19,13 @@ RuboCop::RakeTask.new
require 'yard'
YARD::Rake::YardocTask.new
desc 'Generate changelog'
task :changelog, [:token] do |_t, args|
cmd = 'github_changelog_generator'
cmd << " -u #{github_user}"
cmd << " -p #{github_project}"
cmd << " -t #{args[:token]}" if args[:token]
sh cmd
end

View file

@ -29,4 +29,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'simplecov', '~> 0.10'
spec.add_development_dependency 'yard', '~> 0.8'
spec.add_development_dependency 'redcarpet', '~> 3.3'
spec.add_development_dependency 'github_changelog_generator', '~> 1.6'
end