forked from kotovalexarian/lita-gitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
34 lines (23 loc) · 768 Bytes
/
Rakefile
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
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]
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
task lint: [:rubocop]
require 'rubocop/rake_task'
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