Archived
1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lita-tox/Rakefile

35 lines
704 B
Text
Raw Normal View History

2017-07-20 15:33:29 -04:00
# frozen_string_literal: true
2017-07-20 17:25:53 -04:00
require 'bundler/gem_tasks'
2015-07-25 04:07:37 -04:00
2017-07-20 17:25:53 -04:00
GEMSPEC = Gem::Specification.load 'lita-tox.gemspec'
2015-07-25 04:07:37 -04:00
github_user, github_project =
2017-07-20 17:25:53 -04:00
GEMSPEC.homepage.scan(%r{^https://github\.com/([^/]+)/([^/]+)/?$})[0]
2015-07-25 03:24:48 -04:00
2017-07-20 15:33:29 -04:00
task default: %i[spec lint]
2015-07-25 03:31:14 -04:00
2017-07-20 15:26:02 -04:00
task lint: :rubocop
2015-07-25 03:24:48 -04:00
2017-07-20 15:25:37 -04:00
task fix: 'rubocop:auto_correct'
2017-07-20 17:25:53 -04:00
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
rescue LoadError
nil
end
2015-07-25 04:02:30 -04:00
2017-07-20 17:25:53 -04:00
begin
require 'rubocop/rake_task'
RuboCop::RakeTask.new
rescue LoadError
nil
end
2015-07-25 04:07:37 -04:00
desc 'Generate changelog'
task :changelog, [:token] do |_t, args|
2017-07-20 17:39:23 -04:00
raise 'please provide access token' unless args[:token]
sh "github_changelog_generator -u #{github_user} -p #{github_project} -t #{args[:token]}"
2015-07-25 04:07:37 -04:00
end