-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
33 lines (25 loc) · 911 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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "rubocop/rake_task"
RSpec::Core::RakeTask.new(:specs)
task default: :specs
task :spec do
Rake::Task["specs"].invoke
Rake::Task["rubocop"].invoke
Rake::Task["spec_docs"].invoke
end
desc "Run RuboCop on the lib/specs directory"
RuboCop::RakeTask.new(:rubocop) do |task|
task.patterns = ["lib/**/*.rb", "spec/**/*.rb"]
end
desc "Ensure that the plugin passes `danger plugins lint`"
task :spec_docs do
sh "bundle exec danger plugins lint"
end
desc "Check the precoditions of the release flow"
task :check_release, [:version] do |_, args|
new_version = args.version&.gsub(/\Av/, "") or raise "version argument is required"
require_relative "lib/apkstats/gem_version"
raise "Ver. #{Apkstats::VERSION} is defined but #{new_version} has been requested." unless Apkstats::VERSION == new_version
end