Skip to content

Commit

Permalink
Merge pull request #9 from braiden-vasco/add_changelog_generator
Browse files Browse the repository at this point in the history
Add changelog generator
  • Loading branch information
Braiden Vasco committed Jun 19, 2015
2 parents 98348d2 + 448c07c commit 17d65dc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in lita-gitter.gemspec
gemspec

gem 'github_changelog_generator', '~> 1.6.1'

gem 'yard', '~> 0.8.7.6', require: false
gem 'redcarpet', require: false

Expand Down
20 changes: 20 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
require 'rubygems'

gemspec = Gem::Specification.load('lita-gitter.gemspec')

github_user, github_project =
gemspec.homepage.scan(%r{^https://github\.com/([^/]+)/([^/]+)/?$})[0]

DEFAULT_EXCLUDE_LABELS = 'duplicate,question,invalid,wontfix'

require 'bundler/gem_tasks'

task default: [:spec, :lint]
Expand All @@ -12,3 +21,14 @@ 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]
cmd << " --exclude-labels version,#{DEFAULT_EXCLUDE_LABELS}"

sh cmd
end

0 comments on commit 17d65dc

Please sign in to comment.