drake 0.8.1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +386 -0
- data/MIT-LICENSE +21 -0
- data/README +396 -0
- data/Rakefile +505 -0
- data/TODO +20 -0
- data/bin/drake +31 -0
- data/bin/rake +31 -0
- data/doc/example/Rakefile1 +38 -0
- data/doc/example/Rakefile2 +35 -0
- data/doc/example/a.c +6 -0
- data/doc/example/b.c +6 -0
- data/doc/example/main.c +11 -0
- data/doc/glossary.rdoc +51 -0
- data/doc/jamis.rb +591 -0
- data/doc/proto_rake.rdoc +127 -0
- data/doc/rake.1.gz +0 -0
- data/doc/rakefile.rdoc +534 -0
- data/doc/rational.rdoc +151 -0
- data/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/doc/release_notes/rake-0.8.2.rdoc +163 -0
- data/install.rb +88 -0
- data/lib/rake.rb +2538 -0
- data/lib/rake/classic_namespace.rb +8 -0
- data/lib/rake/clean.rb +33 -0
- data/lib/rake/comp_tree/algorithm.rb +234 -0
- data/lib/rake/comp_tree/bucket_ipc.rb +175 -0
- data/lib/rake/comp_tree/driver.rb +291 -0
- data/lib/rake/comp_tree/error.rb +51 -0
- data/lib/rake/comp_tree/node.rb +189 -0
- data/lib/rake/comp_tree/quix/builtin/kernel/tap.rb +57 -0
- data/lib/rake/comp_tree/quix/diagnostic.rb +92 -0
- data/lib/rake/comp_tree/quix/kernel.rb +109 -0
- data/lib/rake/comp_tree/retriable_fork.rb +66 -0
- data/lib/rake/comp_tree/task_node.rb +46 -0
- data/lib/rake/contrib/compositepublisher.rb +24 -0
- data/lib/rake/contrib/ftptools.rb +153 -0
- data/lib/rake/contrib/publisher.rb +75 -0
- data/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/lib/rake/contrib/sshpublisher.rb +47 -0
- data/lib/rake/contrib/sys.rb +209 -0
- data/lib/rake/gempackagetask.rb +103 -0
- data/lib/rake/loaders/makefile.rb +35 -0
- data/lib/rake/packagetask.rb +185 -0
- data/lib/rake/parallel.rb +54 -0
- data/lib/rake/rake_test_loader.rb +5 -0
- data/lib/rake/rdoctask.rb +147 -0
- data/lib/rake/ruby182_test_unit_fix.rb +23 -0
- data/lib/rake/runtest.rb +23 -0
- data/lib/rake/tasklib.rb +23 -0
- data/lib/rake/testtask.rb +161 -0
- data/test/capture_stdout.rb +26 -0
- data/test/check_expansion.rb +5 -0
- data/test/contrib/test_sys.rb +47 -0
- data/test/data/chains/Rakefile +15 -0
- data/test/data/default/Rakefile +19 -0
- data/test/data/dryrun/Rakefile +22 -0
- data/test/data/file_creation_task/Rakefile +33 -0
- data/test/data/imports/Rakefile +19 -0
- data/test/data/imports/deps.mf +1 -0
- data/test/data/multidesc/Rakefile +17 -0
- data/test/data/namespace/Rakefile +57 -0
- data/test/data/rakelib/test1.rb +3 -0
- data/test/data/rbext/rakefile.rb +3 -0
- data/test/data/sample.mf +12 -0
- data/test/data/statusreturn/Rakefile +8 -0
- data/test/data/unittest/Rakefile +1 -0
- data/test/filecreation.rb +32 -0
- data/test/functional.rb +15 -0
- data/test/in_environment.rb +30 -0
- data/test/parallel.rb +3 -0
- data/test/rake_test_setup.rb +5 -0
- data/test/reqfile.rb +3 -0
- data/test/reqfile2.rb +3 -0
- data/test/session_functional.rb +324 -0
- data/test/shellcommand.rb +3 -0
- data/test/single_threaded.rb +2 -0
- data/test/test_application.rb +714 -0
- data/test/test_clean.rb +14 -0
- data/test/test_definitions.rb +82 -0
- data/test/test_earlytime.rb +35 -0
- data/test/test_extension.rb +63 -0
- data/test/test_file_creation_task.rb +62 -0
- data/test/test_file_task.rb +139 -0
- data/test/test_filelist.rb +618 -0
- data/test/test_fileutils.rb +250 -0
- data/test/test_ftp.rb +59 -0
- data/test/test_invocation_chain.rb +75 -0
- data/test/test_makefile_loader.rb +25 -0
- data/test/test_namespace.rb +36 -0
- data/test/test_package_task.rb +116 -0
- data/test/test_parallel.rb +47 -0
- data/test/test_pathmap.rb +209 -0
- data/test/test_rake.rb +41 -0
- data/test/test_require.rb +33 -0
- data/test/test_rules.rb +348 -0
- data/test/test_task_arguments.rb +89 -0
- data/test/test_task_manager.rb +172 -0
- data/test/test_tasklib.rb +12 -0
- data/test/test_tasks.rb +373 -0
- data/test/test_test_task.rb +75 -0
- data/test/test_top_level_functions.rb +84 -0
- metadata +190 -0
data/Rakefile
ADDED
@@ -0,0 +1,505 @@
|
|
1
|
+
# Rakefile for rake -*- ruby -*-
|
2
|
+
|
3
|
+
# Copyright 2003, 2004, 2005 by Jim Weirich (jim@weirichhouse.org)
|
4
|
+
# All rights reserved.
|
5
|
+
|
6
|
+
# This file may be distributed under an MIT style license. See
|
7
|
+
# MIT-LICENSE for details.
|
8
|
+
|
9
|
+
begin
|
10
|
+
require 'rubygems'
|
11
|
+
require 'rake/gempackagetask'
|
12
|
+
rescue Exception
|
13
|
+
nil
|
14
|
+
end
|
15
|
+
require 'rake/clean'
|
16
|
+
require 'rake/testtask'
|
17
|
+
require 'rake/rdoctask'
|
18
|
+
|
19
|
+
CLEAN.include('**/*.o', '*.dot', '**/*.rbc')
|
20
|
+
CLOBBER.include('doc/example/main', 'testdata')
|
21
|
+
CLOBBER.include('test/data/**/temp_*')
|
22
|
+
CLOBBER.include('test/data/chains/play.*')
|
23
|
+
CLOBBER.include('test/data/file_creation_task/build')
|
24
|
+
CLOBBER.include('test/data/file_creation_task/src')
|
25
|
+
CLOBBER.include('TAGS')
|
26
|
+
CLOBBER.include('coverage', 'rcov_aggregate')
|
27
|
+
|
28
|
+
# Prevent OS X from including extended attribute junk in the tar output
|
29
|
+
ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
|
30
|
+
|
31
|
+
def announce(msg='')
|
32
|
+
STDERR.puts msg
|
33
|
+
end
|
34
|
+
|
35
|
+
# Determine the current version of the software
|
36
|
+
|
37
|
+
if `ruby -Ilib ./bin/drake --version` =~ /rake, version ([0-9.]+)$/
|
38
|
+
CURRENT_VERSION = $1
|
39
|
+
else
|
40
|
+
CURRENT_VERSION = "0.0.0"
|
41
|
+
end
|
42
|
+
|
43
|
+
$package_version = CURRENT_VERSION
|
44
|
+
|
45
|
+
SRC_RB = FileList['lib/**/*.rb']
|
46
|
+
|
47
|
+
# The default task is run if rake is given no explicit arguments.
|
48
|
+
|
49
|
+
desc "Default Task"
|
50
|
+
task :default => :test_all
|
51
|
+
|
52
|
+
# Test Tasks ---------------------------------------------------------
|
53
|
+
task :dbg do |t|
|
54
|
+
puts "Arguments are: #{t.args.join(', ')}"
|
55
|
+
end
|
56
|
+
|
57
|
+
# Common Abbreviations ...
|
58
|
+
|
59
|
+
task :ta => :test_all
|
60
|
+
task :tf => :test_functional
|
61
|
+
task :tu => :test_units
|
62
|
+
task :tc => :test_contribs
|
63
|
+
task :test => :test_units
|
64
|
+
|
65
|
+
all_test_files = FileList[
|
66
|
+
'test/test*.rb',
|
67
|
+
'test/contrib/test*.rb',
|
68
|
+
'test/fun*.rb'
|
69
|
+
]
|
70
|
+
|
71
|
+
task :test_all => [:test_single_threaded, :test_parallel]
|
72
|
+
|
73
|
+
Rake::TestTask.new(:test_parallel) do |t|
|
74
|
+
t.test_files = FileList['test/parallel.rb'] + all_test_files
|
75
|
+
t.warning = true
|
76
|
+
t.verbose = false
|
77
|
+
end
|
78
|
+
|
79
|
+
Rake::TestTask.new(:test_single_threaded) do |t|
|
80
|
+
t.test_files = FileList['test/single_threaded.rb'] + all_test_files
|
81
|
+
t.warning = true
|
82
|
+
t.verbose = false
|
83
|
+
end
|
84
|
+
|
85
|
+
Rake::TestTask.new(:test_units) do |t|
|
86
|
+
t.test_files = FileList['test/test*.rb']
|
87
|
+
t.warning = true
|
88
|
+
t.verbose = false
|
89
|
+
end
|
90
|
+
|
91
|
+
Rake::TestTask.new(:test_functional) do |t|
|
92
|
+
t.test_files = FileList['test/fun*.rb']
|
93
|
+
t.warning = true
|
94
|
+
t.verbose = false
|
95
|
+
end
|
96
|
+
|
97
|
+
Rake::TestTask.new(:test_contribs) do |t|
|
98
|
+
t.test_files = FileList['test/contrib/test*.rb']
|
99
|
+
t.warning = true
|
100
|
+
t.verbose = false
|
101
|
+
end
|
102
|
+
|
103
|
+
Rake::TestTask.new(:test_current) do |t|
|
104
|
+
t.test_files = FileList['test/parallel.rb', 'test/test_tasks.rb']
|
105
|
+
t.warning = true
|
106
|
+
t.verbose = false
|
107
|
+
end
|
108
|
+
|
109
|
+
begin
|
110
|
+
require 'rcov/rcovtask'
|
111
|
+
|
112
|
+
Rcov::RcovTask.new do |t|
|
113
|
+
t.libs << "test"
|
114
|
+
dot_rakes =
|
115
|
+
t.rcov_opts = [
|
116
|
+
'-xRakefile', '-xrakefile', '-xpublish.rf',
|
117
|
+
'-xlib/rake/contrib', '-x/Library',
|
118
|
+
'--text-report',
|
119
|
+
'--sort coverage'
|
120
|
+
] + FileList['rakelib/*.rake'].pathmap("-x%p")
|
121
|
+
t.test_files = FileList[
|
122
|
+
'test/test*.rb', 'test/functional.rb'
|
123
|
+
]
|
124
|
+
t.output_dir = 'coverage'
|
125
|
+
t.verbose = true
|
126
|
+
end
|
127
|
+
rescue LoadError
|
128
|
+
puts "RCov is not available"
|
129
|
+
end
|
130
|
+
|
131
|
+
directory 'testdata'
|
132
|
+
[:test_all, :test_units, :test_contribs, :test_functional].each do |t|
|
133
|
+
task t => ['testdata']
|
134
|
+
end
|
135
|
+
|
136
|
+
# CVS Tasks ----------------------------------------------------------
|
137
|
+
|
138
|
+
# Install rake using the standard install.rb script.
|
139
|
+
|
140
|
+
desc "Install the application"
|
141
|
+
task :install do
|
142
|
+
ruby "install.rb"
|
143
|
+
end
|
144
|
+
|
145
|
+
# Create a task to build the RDOC documentation tree.
|
146
|
+
|
147
|
+
rd = Rake::RDocTask.new("rdoc") { |rdoc|
|
148
|
+
rdoc.rdoc_dir = 'html'
|
149
|
+
# rdoc.template = 'kilmer'
|
150
|
+
# rdoc.template = 'css2'
|
151
|
+
rdoc.template = 'doc/jamis.rb'
|
152
|
+
rdoc.title = "Rake -- Ruby Make"
|
153
|
+
rdoc.options << '--line-numbers' << '--inline-source' <<
|
154
|
+
'--main' << 'README' <<
|
155
|
+
'--title' << 'Rake -- Ruby Make'
|
156
|
+
rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
|
157
|
+
rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
|
158
|
+
rdoc.rdoc_files.exclude(/\bcontrib\b/)
|
159
|
+
}
|
160
|
+
|
161
|
+
# ====================================================================
|
162
|
+
# Create a task that will package the Rake software into distributable
|
163
|
+
# tar, zip and gem files.
|
164
|
+
|
165
|
+
PKG_FILES = FileList[
|
166
|
+
'install.rb',
|
167
|
+
'[A-Z]*',
|
168
|
+
'bin/**/*',
|
169
|
+
'lib/**/*.rb',
|
170
|
+
'test/**/*.rb',
|
171
|
+
'test/**/*.rf',
|
172
|
+
'test/**/*.mf',
|
173
|
+
'test/**/Rakefile',
|
174
|
+
'test/**/subdir',
|
175
|
+
'doc/**/*'
|
176
|
+
]
|
177
|
+
PKG_FILES.exclude('doc/example/*.o')
|
178
|
+
PKG_FILES.exclude(%r{doc/example/main$})
|
179
|
+
|
180
|
+
if ! defined?(Gem)
|
181
|
+
puts "Package Target requires RubyGEMs"
|
182
|
+
else
|
183
|
+
SPEC = Gem::Specification.new do |s|
|
184
|
+
|
185
|
+
#### Basic information.
|
186
|
+
|
187
|
+
s.name = 'drake'
|
188
|
+
s.version = $package_version
|
189
|
+
s.summary = "Ruby based make-like utility."
|
190
|
+
s.description = <<-EOF
|
191
|
+
Rake is a Make-like program implemented in Ruby. Tasks
|
192
|
+
and dependencies are specified in standard Ruby syntax.
|
193
|
+
EOF
|
194
|
+
|
195
|
+
#### Dependencies and requirements.
|
196
|
+
|
197
|
+
#s.add_dependency('log4r', '> 1.0.4')
|
198
|
+
#s.requirements << ""
|
199
|
+
|
200
|
+
#### Which files are to be included in this gem? Everything! (Except CVS directories.)
|
201
|
+
|
202
|
+
s.files = PKG_FILES.to_a
|
203
|
+
|
204
|
+
#### C code extensions.
|
205
|
+
|
206
|
+
#s.extensions << "ext/rmagic/extconf.rb"
|
207
|
+
|
208
|
+
#### Load-time details: library and application (you will need one or both).
|
209
|
+
|
210
|
+
s.require_path = 'lib' # Use these for libraries.
|
211
|
+
|
212
|
+
s.bindir = "bin" # Use these for applications.
|
213
|
+
s.executables = ["drake"]
|
214
|
+
s.default_executable = "drake"
|
215
|
+
|
216
|
+
#### Documentation and testing.
|
217
|
+
|
218
|
+
s.has_rdoc = true
|
219
|
+
s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
|
220
|
+
s.rdoc_options = rd.options
|
221
|
+
|
222
|
+
#### Author and project details.
|
223
|
+
|
224
|
+
s.author = "Jim Weirich, James M. Lawrence"
|
225
|
+
s.email = "quixoticsycophant@gmail.com"
|
226
|
+
s.homepage = "http://drake.rubyforge.org"
|
227
|
+
s.rubyforge_project = "drake"
|
228
|
+
# if ENV['CERT_DIR']
|
229
|
+
# s.signing_key = File.join(ENV['CERT_DIR'], 'gem-private_key.pem')
|
230
|
+
# s.cert_chain = [File.join(ENV['CERT_DIR'], 'gem-public_cert.pem')]
|
231
|
+
# end
|
232
|
+
end
|
233
|
+
|
234
|
+
package_task = Rake::GemPackageTask.new(SPEC) do |pkg|
|
235
|
+
pkg.need_zip = true
|
236
|
+
pkg.need_tar = true
|
237
|
+
end
|
238
|
+
|
239
|
+
file "drake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t|
|
240
|
+
require 'yaml'
|
241
|
+
open(t.name, "w") { |f| f.puts SPEC.to_yaml }
|
242
|
+
end
|
243
|
+
|
244
|
+
desc "Create a stand-alone gemspec"
|
245
|
+
task :gemspec => "drake.gemspec"
|
246
|
+
end
|
247
|
+
|
248
|
+
# Misc tasks =========================================================
|
249
|
+
|
250
|
+
def count_lines(filename)
|
251
|
+
lines = 0
|
252
|
+
codelines = 0
|
253
|
+
open(filename) { |f|
|
254
|
+
f.each do |line|
|
255
|
+
lines += 1
|
256
|
+
next if line =~ /^\s*$/
|
257
|
+
next if line =~ /^\s*#/
|
258
|
+
codelines += 1
|
259
|
+
end
|
260
|
+
}
|
261
|
+
[lines, codelines]
|
262
|
+
end
|
263
|
+
|
264
|
+
def show_line(msg, lines, loc)
|
265
|
+
printf "%6s %6s %s\n", lines.to_s, loc.to_s, msg
|
266
|
+
end
|
267
|
+
|
268
|
+
desc "Count lines in the main rake file"
|
269
|
+
task :lines do
|
270
|
+
total_lines = 0
|
271
|
+
total_code = 0
|
272
|
+
show_line("File Name", "LINES", "LOC")
|
273
|
+
SRC_RB.each do |fn|
|
274
|
+
lines, codelines = count_lines(fn)
|
275
|
+
show_line(fn, lines, codelines)
|
276
|
+
total_lines += lines
|
277
|
+
total_code += codelines
|
278
|
+
end
|
279
|
+
show_line("TOTAL", total_lines, total_code)
|
280
|
+
end
|
281
|
+
|
282
|
+
# Define an optional publish target in an external file. If the
|
283
|
+
# publish.rf file is not found, the publish targets won't be defined.
|
284
|
+
|
285
|
+
load "publish.rf" if File.exist? "publish.rf"
|
286
|
+
|
287
|
+
# Support Tasks ------------------------------------------------------
|
288
|
+
|
289
|
+
RUBY_FILES = FileList['**/*.rb'].exclude('pkg')
|
290
|
+
|
291
|
+
desc "Look for TODO and FIXME tags in the code"
|
292
|
+
task :todo do
|
293
|
+
RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/)
|
294
|
+
end
|
295
|
+
|
296
|
+
desc "Look for Debugging print lines"
|
297
|
+
task :dbg do
|
298
|
+
RUBY_FILES.egrep(/\bDBG|\bbreakpoint\b/)
|
299
|
+
end
|
300
|
+
|
301
|
+
desc "List all ruby files"
|
302
|
+
task :rubyfiles do
|
303
|
+
puts RUBY_FILES
|
304
|
+
puts FileList['bin/*'].exclude('bin/*.rb')
|
305
|
+
end
|
306
|
+
task :rf => :rubyfiles
|
307
|
+
|
308
|
+
desc "Create a TAGS file"
|
309
|
+
task :tags => "TAGS"
|
310
|
+
|
311
|
+
TAGS = 'xctags -e'
|
312
|
+
|
313
|
+
file "TAGS" => RUBY_FILES do
|
314
|
+
puts "Makings TAGS"
|
315
|
+
sh "#{TAGS} #{RUBY_FILES}", :verbose => false
|
316
|
+
end
|
317
|
+
|
318
|
+
# --------------------------------------------------------------------
|
319
|
+
# Creating a release
|
320
|
+
|
321
|
+
def plugin(plugin_name)
|
322
|
+
require "rake/plugins/#{plugin_name}"
|
323
|
+
end
|
324
|
+
|
325
|
+
task :noop
|
326
|
+
#plugin "release_manager"
|
327
|
+
|
328
|
+
desc "Make a new release"
|
329
|
+
task :release, :rel, :reuse, :reltest,
|
330
|
+
:needs => [
|
331
|
+
:prerelease,
|
332
|
+
:clobber,
|
333
|
+
:test_all,
|
334
|
+
:update_version,
|
335
|
+
:package,
|
336
|
+
:tag
|
337
|
+
] do
|
338
|
+
announce
|
339
|
+
announce "**************************************************************"
|
340
|
+
announce "* Release #{$package_version} Complete."
|
341
|
+
announce "* Packages ready to upload."
|
342
|
+
announce "**************************************************************"
|
343
|
+
announce
|
344
|
+
end
|
345
|
+
|
346
|
+
# Validate that everything is ready to go for a release.
|
347
|
+
task :prerelease, :rel, :reuse, :reltest do |t, args|
|
348
|
+
$package_version = args.rel
|
349
|
+
announce
|
350
|
+
announce "**************************************************************"
|
351
|
+
announce "* Making RubyGem Release #{$package_version}"
|
352
|
+
announce "* (current version #{CURRENT_VERSION})"
|
353
|
+
announce "**************************************************************"
|
354
|
+
announce
|
355
|
+
|
356
|
+
# Is a release number supplied?
|
357
|
+
unless args.rel
|
358
|
+
fail "Usage: rake release[X.Y.Z] [REUSE=tag_suffix]"
|
359
|
+
end
|
360
|
+
|
361
|
+
# Is the release different than the current release.
|
362
|
+
# (or is REUSE set?)
|
363
|
+
if $package_version == CURRENT_VERSION && ! args.reuse
|
364
|
+
fail "Current version is #{$package_version}, must specify REUSE=tag_suffix to reuse version"
|
365
|
+
end
|
366
|
+
|
367
|
+
# Are all source files checked in?
|
368
|
+
if args.reltest
|
369
|
+
announce "Release Task Testing, skipping checked-in file test"
|
370
|
+
else
|
371
|
+
announce "Checking for unchecked-in files..."
|
372
|
+
data = `svn st`
|
373
|
+
unless data =~ /^$/
|
374
|
+
abort "svn status is not clean ... do you have unchecked-in files?"
|
375
|
+
end
|
376
|
+
announce "No outstanding checkins found ... OK"
|
377
|
+
end
|
378
|
+
end
|
379
|
+
|
380
|
+
task :update_version, :rel, :reuse, :reltest,
|
381
|
+
:needs => [:prerelease] do |t, args|
|
382
|
+
if args.rel == CURRENT_VERSION
|
383
|
+
announce "No version change ... skipping version update"
|
384
|
+
else
|
385
|
+
announce "Updating Rake version to #{args.rel}"
|
386
|
+
open("lib/rake.rb") do |rakein|
|
387
|
+
open("lib/rake.rb.new", "w") do |rakeout|
|
388
|
+
rakein.each do |line|
|
389
|
+
if line =~ /^RAKEVERSION\s*=\s*/
|
390
|
+
rakeout.puts "RAKEVERSION = '#{args.rel}'"
|
391
|
+
else
|
392
|
+
rakeout.puts line
|
393
|
+
end
|
394
|
+
end
|
395
|
+
end
|
396
|
+
end
|
397
|
+
mv "lib/rake.rb.new", "lib/rake.rb"
|
398
|
+
if args.reltest
|
399
|
+
announce "Release Task Testing, skipping commiting of new version"
|
400
|
+
else
|
401
|
+
sh %{svn commit -m "Updated to version #{args.rel}" lib/rake.rb} # "
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|
405
|
+
|
406
|
+
desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
|
407
|
+
task :tag, :rel, :reuse, :reltest,
|
408
|
+
:needs => [:prerelease] do |t, args|
|
409
|
+
reltag = "REL_#{args.rel.gsub(/\./, '_')}"
|
410
|
+
reltag << args.reuse.gsub(/\./, '_') if args.reuse
|
411
|
+
announce "Tagging Repository with [#{reltag}]"
|
412
|
+
if args.reltest
|
413
|
+
announce "Release Task Testing, skipping CVS tagging"
|
414
|
+
else
|
415
|
+
sh %{svn copy svn+ssh://rubyforge.org/var/svn/rake/trunk svn+ssh://rubyforge.org/var/svn/rake/tags/#{reltag} -m 'Commiting release #{reltag}'} ###'
|
416
|
+
end
|
417
|
+
end
|
418
|
+
|
419
|
+
desc "Install the jamis RDoc template"
|
420
|
+
task :install_jamis_template do
|
421
|
+
require 'rbconfig'
|
422
|
+
dest_dir = File.join(Config::CONFIG['rubylibdir'], "rdoc/generators/template/html")
|
423
|
+
fail "Unabled to write to #{dest_dir}" unless File.writable?(dest_dir)
|
424
|
+
install "doc/jamis.rb", dest_dir, :verbose => true
|
425
|
+
end
|
426
|
+
|
427
|
+
# Require experimental XForge/Metaproject support.
|
428
|
+
|
429
|
+
load 'xforge.rf' if File.exist?('xforge.rf')
|
430
|
+
|
431
|
+
desc "Where is the current directory. This task displays\nthe current rake directory"
|
432
|
+
task :where_am_i do
|
433
|
+
puts Rake.original_dir
|
434
|
+
end
|
435
|
+
|
436
|
+
######################################################################
|
437
|
+
# repackage files from contrib/
|
438
|
+
|
439
|
+
$LOAD_PATH.unshift "./contrib/comp_tree/contrib/quix/lib"
|
440
|
+
require 'quix/subpackager'
|
441
|
+
require 'quix/fileutils'
|
442
|
+
|
443
|
+
task :generate_rb do
|
444
|
+
packages = {
|
445
|
+
:rake => {
|
446
|
+
:name_in_ruby => "Rake",
|
447
|
+
:lib_dir => "./lib",
|
448
|
+
:subpackages => {
|
449
|
+
:comp_tree => {
|
450
|
+
:name_in_ruby => "CompTree",
|
451
|
+
:sources => [
|
452
|
+
"driver",
|
453
|
+
"node",
|
454
|
+
"task_node",
|
455
|
+
"error",
|
456
|
+
"bucket_ipc",
|
457
|
+
"algorithm",
|
458
|
+
"retriable_fork",
|
459
|
+
"quix/diagnostic",
|
460
|
+
"quix/kernel",
|
461
|
+
"quix/builtin/kernel/tap",
|
462
|
+
],
|
463
|
+
:lib_dir => "./contrib/comp_tree/lib",
|
464
|
+
:ignore_root_rb => true,
|
465
|
+
},
|
466
|
+
},
|
467
|
+
},
|
468
|
+
}
|
469
|
+
Quix::Subpackager.run(packages)
|
470
|
+
end
|
471
|
+
|
472
|
+
###########################################
|
473
|
+
# git
|
474
|
+
|
475
|
+
def git(*args)
|
476
|
+
cmd = ["git"] + args
|
477
|
+
sh(*cmd)
|
478
|
+
end
|
479
|
+
|
480
|
+
task :add_contrib_first_time => :init_contrib do
|
481
|
+
git(*%w!merge --squash -s ours --no-commit comp_tree/master!)
|
482
|
+
git(*%w!read-tree --prefix=contrib/comp_tree -u comp_tree/master!)
|
483
|
+
git("commit", "-m", "add comp_tree package")
|
484
|
+
end
|
485
|
+
|
486
|
+
task :init_contrib do
|
487
|
+
unless `git remote`.split.include? "comp_tree"
|
488
|
+
git(*%w!remote add -f comp_tree git@github.com:quix/comp_tree.git!)
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
task :run_pull_contrib => :init_contrib do
|
493
|
+
git(*%w!pull --no-commit -s subtree comp_tree master!)
|
494
|
+
end
|
495
|
+
|
496
|
+
task :pull_mainline do
|
497
|
+
git(*%w!pull --no-commit
|
498
|
+
git://github.com/jimweirich/rake.git
|
499
|
+
refs/heads/master:refs/heads/origin!)
|
500
|
+
end
|
501
|
+
|
502
|
+
######################################################################
|
503
|
+
# toplevel
|
504
|
+
|
505
|
+
task :pull_contrib => [ :init_contrib, :run_pull_contrib, :generate_rb ]
|