-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
51 lines (40 loc) · 1.03 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"
require "bundler/setup"
PROJECT_ROOT = File.expand_path("..", __FILE__)
$:.unshift "#{PROJECT_ROOT}/lib"
require "pseudo-terminal/version"
require "rspec/core/rake_task"
desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.verbose = true
end
task :default => :spec
def builder(action, ext)
package_file = "pkg/pseudo-terminal-#{PseudoTerminal::VERSION}.#{ext}"
puts "#{action}: #{package_file}"
system "build/#{ext}/#{action} #{PROJECT_ROOT} #{package_file}"
end
namespace :package do
desc "package the gem version"
task :gem do
builder :package, :gem
end
desc "package the tgz version"
task :tgz do
builder :package, :tgz
end
end
desc "package all"
task :package => %w( package:gem package:tgz )
namespace :release do
desc "release the gem version"
task :gem => "package:gem" do
builder :release, :gem
end
desc "release the tgz version"
task :tgz => "package:tgz" do
builder :release, :tgz
end
end
desc "release all"
task :release => %w( release:gem release:tgz )