-
Notifications
You must be signed in to change notification settings - Fork 39
/
Rakefile
51 lines (42 loc) · 1.08 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
45
46
47
48
49
50
51
require 'rubygems'
$gemspec_file = nil
$gemspec = nil
task 'README' do
Dir.chdir('docs') do
system('make', 'zonify.txt') or abort "Docs build failed."
end
end
task :gemspec_file do
$gemspec_file = Dir['*.gemspec'].first unless $gemspec_file
end
task :gemspec do
load $gemspec_file
$gemspec = @spec
end
task :gemspec => :gemspec_file
desc 'Create a gem for this project.'
task :gem do
system "gem build #{$gemspec_file}"
end
task :gem => :gemspec_file
desc 'Install the gem for this project.'
task :install => :gem do
system "gem install #{$gemspec.name}-#{$gemspec.version}.gem"
end
task :install => [ :gem, :gemspec ]
desc 'Remove the gem installed by this project.'
task :uninstall do
system "gem uninstall #{$gemspec.name} --version #{$gemspec.version}"
end
task :uninstall => :gemspec
desc 'Delete gem.'
task :clean do
system 'rm -f *.gem'
end
task :sign do
gem = "#{$gemspec.name}-#{$gemspec.version}.gem"
system "gpg --sign --detach #{gem}"
system "shasum --portable --algorithm 512 #{gem} > #{gem}.sha"
end
task :sign => [:gem, :gemspec]
task :dist => [:gem, :sign]