-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
39 lines (27 loc) · 720 Bytes
/
Copy pathRakefile
File metadata and controls
39 lines (27 loc) · 720 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
33
34
35
36
37
38
39
# vim: syntax=ruby
# gem install rake-compiler
# gem install asciidoctor
require "rake/extensiontask"
Rake::ExtensionTask.new "lttng_ust_ruby_agent" do |ext|
ext.lib_dir = "lib"
end
require 'yaml'
require 'find'
require 'erb'
require 'date'
require 'mkmf'
config = YAML.load_file(File.join(__dir__, "project.yaml"))
project = config.fetch('name', File.split(File.expand_path(__dir__)).last)
version = "0.1"
task default: [:build]
task :build => [ :compile] do
system "gem build #{project}.gemspec"
end
task :install => [:build] do
system "gem install ./#{project}-#{version}.gem"
end
task :clean do
rm_f "./#{project}-#{version}.gem"
rm_f "./lib/#{project.gsub(/-/, '_')}_ext.so"
rm_rf "tmp"
end