forked from driv3r/rusty_json_schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
28 lines (21 loc) · 853 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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "rubocop/rake_task"
require "thermite/tasks"
require_relative "lib/tasks/thermite_dir_patch"
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new
thermite = Thermite::Tasks.new
desc "Make existing extension default one"
task build: ["thermite:build"] do
unless File.exist?(thermite.config.ruby_extension_path)
puts "File doesn't exist: #{thermite.config.ruby_extension_path.inspect}"
next
end
platform = "#{Gem::Platform.local.cpu}-#{Gem::Platform.local.os}"
puts "Make #{thermite.config.ruby_extension_path} a #{platform} default implementation"
FileUtils.cp(thermite.config.ruby_extension_path,
"#{thermite.config.ruby_extension_path}.#{platform}.default")
end
task default: %i[build thermite:test spec rubocop]