-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
44 lines (37 loc) · 1.02 KB
/
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
35
36
37
38
39
40
41
42
43
44
require 'capn_proto/version'
GEMSPEC = eval(File.read('capn_proto.gemspec'))
require 'rubygems/package_task'
Gem::PackageTask.new(GEMSPEC) do |pkg|
end
require 'rake/extensiontask'
Rake::ExtensionTask.new('capn_proto', GEMSPEC) do |ext|
ext.ext_dir = 'ext/capn_proto'
ext.lib_dir = 'lib/capn_proto'
ext.source_pattern = "*.{cc,h}"
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |config|
end
task :default => [:compile, :spec]
Rake::Task["clean"].clear
desc "Clean build artifacts"
task :clean do
rm_r "tmp" rescue nil
rm_r "pkg" rescue nil
rm "lib/capn_proto/capn_proto.bundle" rescue nil
end
desc "Tag commit, push to repo, then push to RubyGems"
task :release => [:clean, :compile, :spec, :gem] do
tag = "v#{CapnProto::VERSION}"
sh "git tag #{tag}"
sh "git push origin #{tag}"
sh "gem push pkg/capn_proto-#{CapnProto::VERSION}.gem"
end
desc "Open an irb console"
task :console do
$: << File.expand_path("../lib", __FILE__)
require 'irb'
require 'capn_proto'
ARGV.clear
IRB.start
end