-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathRakefile
More file actions
32 lines (27 loc) · 768 Bytes
/
Rakefile
File metadata and controls
32 lines (27 loc) · 768 Bytes
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
# frozen_string_literal: true
require 'bundler/gem_tasks'
require_relative 'support/current_bundle'
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(spec: :before_spec) do |config|
config.verbose = true
end
rescue LoadError
task :spec do
appraisal = SuperDiff::CurrentBundle.instance.latest_appraisal
exec "appraisal #{appraisal.name} rake spec --trace"
end
end
task :default do
if SuperDiff::CurrentBundle.instance.appraisal_in_use?
sh 'rake spec'
elsif ENV['CI']
exec 'appraisal rake --trace'
else
appraisal = SuperDiff::CurrentBundle.instance.latest_appraisal
exec "appraisal #{appraisal.name} rake --trace"
end
end
task :before_spec do
FileUtils.rm_rf(File.expand_path('./spec/tmp', __dir__))
end