forked from nene/rkelly-remix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
41 lines (34 loc) · 1.14 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
require 'rubygems'
require 'hoe'
Hoe.plugin :gemspec # `gem install hoe-gemspec`
Hoe.plugin :git # `gem install hoe-git`
GENERATED_PARSER = "lib/rkelly/generated_parser.rb"
HOE = Hoe.spec('rkelly-turbo') do |p|
license "MIT"
developer('Aaron Patterson', '[email protected]')
developer('Rene Saarsoo', '[email protected]')
developer('hmdne', '[email protected]')
self.readme_file = 'README.rdoc'
self.history_file = 'CHANGELOG.rdoc'
self.extra_rdoc_files = FileList['*.rdoc']
self.clean_globs = [GENERATED_PARSER]
end
file GENERATED_PARSER => "lib/parser.y" do |t|
if ENV['DEBUG']
sh "racc -g -v -o #{t.name} #{t.prerequisites.first}"
else
sh "racc -o #{t.name} #{t.prerequisites.first}"
end
end
task :parser => GENERATED_PARSER
# make sure the parser's up-to-date when we test
Rake::Task[:test].prerequisites << :parser
Rake::Task[:check_manifest].prerequisites << :parser
namespace :gem do
task :spec do
File.open("#{HOE.name}.gemspec", 'w') do |f|
HOE.spec.version = "#{HOE.version}.#{Time.now.strftime("%Y%m%d%H%M%S")}"
f.write(HOE.spec.to_ruby)
end
end
end