Skip to content
Newer
Older
100644 433 lines (353 sloc) 11 KB
de564de Initial revision
jimweirich authored
1 # Rakefile for rake -*- ruby -*-
2
dd80335 Added rf abbreviation.
jimweirich authored
3 # Copyright 2003, 2004, 2005 by Jim Weirich (jim@weirichhouse.org)
47fb00b Added comments.
jimweirich authored
4 # All rights reserved.
5
ac681d3 modified rakefile to Bil Klebs suggestions
jimweirich authored
6 # This file may be distributed under an MIT style license. See
47fb00b Added comments.
jimweirich authored
7 # MIT-LICENSE for details.
8
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored
9 begin
10 require 'rubygems'
77a0ad2 Added 2004 to copyright.
jimweirich authored
11 require 'rake/gempackagetask'
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored
12 rescue Exception
13 nil
14 end
2337d2a require clean was missing in the main Rakefile ... how could that be?
jimweirich authored
15 require 'rake/clean'
1bd831f Started the splitup of rubyapp into smaller, reusable components (e.g…
jimweirich authored
16 require 'rake/testtask'
8bd21da Broke rubyapp into smaller pieces.
jimweirich authored
17 require 'rake/rdoctask'
18
f8d1b8b @jimweirich Updated RBC clean extensions.
authored
19 CLEAN.include('**/*.o', '*.dot', '**/*.rbc')
e5a65e1 Added testdata to clobber.
jimweirich authored
20 CLOBBER.include('doc/example/main', 'testdata')
b819a17 Added temp files from dry run test to clobber.
jimweirich authored
21 CLOBBER.include('test/data/**/temp_*')
6f834d6 Added chains temp files to clobber list.
jimweirich authored
22 CLOBBER.include('test/data/chains/play.*')
ceb84f1 version 0.5.4.3 -- fowler directory fixes
jimweirich authored
23 CLOBBER.include('test/data/file_creation_task/build')
24 CLOBBER.include('test/data/file_creation_task/src')
df6dea6 Clobber TAGS.
jimweirich authored
25 CLOBBER.include('TAGS')
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
26 CLOBBER.include('coverage', 'rcov_aggregate')
0482ac8 The Jamis rdoc template is only used if it is present.
jimweirich authored
27
0c3268a fixed FistList order test bug. Mac extended attrs in tar. Missing subdir
jimweirich authored
28 # Prevent OS X from including extended attribute junk in the tar output
29 ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
30
da7cb40 Added release management to Rakefile
jimweirich authored
31 def announce(msg='')
32 STDERR.puts msg
33 end
0482ac8 The Jamis rdoc template is only used if it is present.
jimweirich authored
34
47fb00b Added comments.
jimweirich authored
35 # Determine the current version of the software
36
5e23db9 Make version detection more robust.
jimweirich authored
37 if `ruby -Ilib ./bin/rake --version` =~ /rake, version ([0-9.]+)$/
38 CURRENT_VERSION = $1
da7cb40 Added release management to Rakefile
jimweirich authored
39 else
40 CURRENT_VERSION = "0.0.0"
41 end
42
b2d9457 updating release procedure
jimweirich authored
43 $package_version = CURRENT_VERSION
1bd831f Started the splitup of rubyapp into smaller, reusable components (e.g…
jimweirich authored
44
b461240 Lines task now counts all source files.
jimweirich authored
45 SRC_RB = FileList['lib/**/*.rb']
46
47fb00b Added comments.
jimweirich authored
47 # The default task is run if rake is given no explicit arguments.
48
8bd21da Broke rubyapp into smaller pieces.
jimweirich authored
49 desc "Default Task"
538b7b7 renamed test targets
jimweirich authored
50 task :default => :test_all
de564de Initial revision
jimweirich authored
51
9b9204a Changed test tasks back to using the rake provided task macros.
jimweirich authored
52 # Test Tasks ---------------------------------------------------------
9ca2c3d Added task arguments
jimweirich authored
53 task :dbg do |t|
54 puts "Arguments are: #{t.args.join(', ')}"
55 end
1bd831f Started the splitup of rubyapp into smaller, reusable components (e.g…
jimweirich authored
56
538b7b7 renamed test targets
jimweirich authored
57 # Common Abbreviations ...
43d4081 Added Test abbreviations to Rakefile.
jimweirich authored
58
eb6702a @jimweirich Fixed testing shortcuts.
authored
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"
538b7b7 renamed test targets
jimweirich authored
64
a66153a @jimweirich Fixed up test location for r19 and rbx.
authored
65 namespace :test do
66 Rake::TestTask.new(:all) do |t|
ef833eb Make testall the default task.
jimweirich authored
67 t.test_files = FileList[
63d419d @jimweirich Restructured tests into subdirectories and switched to the *_test.rb …
authored
68 'test/lib/*_test.rb',
69 'test/contrib/*_test.rb',
70 'test/functional/*_test.rb'
ef833eb Make testall the default task.
jimweirich authored
71 ]
ddd28f9 bump version to intermediate 0.5.3.1. changed tests to non-verbose
jimweirich authored
72 t.warning = true
0c5500a Added existing and existing! methods to FileList.
jimweirich authored
73 t.verbose = false
ef833eb Make testall the default task.
jimweirich authored
74 end
75
a66153a @jimweirich Fixed up test location for r19 and rbx.
authored
76 Rake::TestTask.new(:units) do |t|
63d419d @jimweirich Restructured tests into subdirectories and switched to the *_test.rb …
authored
77 t.test_files = FileList['test/lib/*_test.rb']
ddd28f9 bump version to intermediate 0.5.3.1. changed tests to non-verbose
jimweirich authored
78 t.warning = true
79 t.verbose = false
a94b20c Changed the Rakefile to run the test raw (i.e. without the test task).
jimweirich authored
80 end
de564de Initial revision
jimweirich authored
81
a66153a @jimweirich Fixed up test location for r19 and rbx.
authored
82 Rake::TestTask.new(:functional) do |t|
63d419d @jimweirich Restructured tests into subdirectories and switched to the *_test.rb …
authored
83 t.test_files = FileList['test/functional/*_test.rb']
ddd28f9 bump version to intermediate 0.5.3.1. changed tests to non-verbose
jimweirich authored
84 t.warning = true
388dece Fixed accidental reuse of name in test.
jimweirich authored
85 t.verbose = false
9b9204a Changed test tasks back to using the rake provided task macros.
jimweirich authored
86 end
87
a66153a @jimweirich Fixed up test location for r19 and rbx.
authored
88 Rake::TestTask.new(:contribs) do |t|
ddd28f9 bump version to intermediate 0.5.3.1. changed tests to non-verbose
jimweirich authored
89 t.test_files = FileList['test/contrib/test*.rb']
90 t.warning = true
388dece Fixed accidental reuse of name in test.
jimweirich authored
91 t.verbose = false
f521baa Added comments to test task.
jimweirich authored
92 end
a66153a @jimweirich Fixed up test location for r19 and rbx.
authored
93 end
f521baa Added comments to test task.
jimweirich authored
94
0c5500a Added existing and existing! methods to FileList.
jimweirich authored
95 begin
96 require 'rcov/rcovtask'
97
98 Rcov::RcovTask.new do |t|
99 t.libs << "test"
fcf0bb1 @jimweirich some refactoring and code cleanup. Better coverage
authored
100 dot_rakes =
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
101 t.rcov_opts = [
fcf0bb1 @jimweirich some refactoring and code cleanup. Better coverage
authored
102 '-xRakefile', '-xrakefile', '-xpublish.rf',
103 '-xlib/rake/contrib', '-x/Library',
8519372 @jimweirich improved coverage
authored
104 '--text-report',
fcf0bb1 @jimweirich some refactoring and code cleanup. Better coverage
authored
105 '--sort coverage'
106 ] + FileList['rakelib/*.rake'].pathmap("-x%p")
0c5500a Added existing and existing! methods to FileList.
jimweirich authored
107 t.test_files = FileList[
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
108 'test/test*.rb', 'test/functional.rb'
0c5500a Added existing and existing! methods to FileList.
jimweirich authored
109 ]
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
110 t.output_dir = 'coverage'
0c5500a Added existing and existing! methods to FileList.
jimweirich authored
111 t.verbose = true
112 end
113 rescue LoadError
fbead1c Prettier inspect for tasks.
jimweirich authored
114 puts "RCov is not available"
c8197eb added rcov and unit tests
jimweirich authored
115 end
116
de564de Initial revision
jimweirich authored
117 directory 'testdata'
538b7b7 renamed test targets
jimweirich authored
118 [:test_all, :test_units, :test_contribs, :test_functional].each do |t|
a4b6d36 updated comments in est file.
jimweirich authored
119 task t => ['testdata']
120 end
47fb00b Added comments.
jimweirich authored
121
9b9204a Changed test tasks back to using the rake provided task macros.
jimweirich authored
122 # CVS Tasks ----------------------------------------------------------
47fb00b Added comments.
jimweirich authored
123
124 # Install rake using the standard install.rb script.
8bd21da Broke rubyapp into smaller pieces.
jimweirich authored
125
126 desc "Install the application"
127 task :install do
128 ruby "install.rb"
129 end
1bd831f Started the splitup of rubyapp into smaller, reusable components (e.g…
jimweirich authored
130
47fb00b Added comments.
jimweirich authored
131 # Create a task to build the RDOC documentation tree.
132
9c4d005 @jimweirich added ability to use darkfish-rdoc if installed.
authored
133 begin
134 require 'darkfish-rdoc'
135 DARKFISH_ENABLED = true
136 rescue LoadError => ex
137 DARKFISH_ENABLED = false
138 end
139
05ffed8 @jimweirich Modifed Rakefile to not require darkfish for the GemSpec
authored
140 BASE_RDOC_OPTIONS = [
f6d26a5 @jimweirich Updated rakefile to not generate darkfish in the gemspec.
authored
141 '--line-numbers', '--inline-source',
142 '--main' , 'README',
143 '--title', 'Rake -- Ruby Make'
05ffed8 @jimweirich Modifed Rakefile to not require darkfish for the GemSpec
authored
144 ]
145
9c4d005 @jimweirich added ability to use darkfish-rdoc if installed.
authored
146 rd = Rake::RDocTask.new("rdoc") do |rdoc|
47fb00b Added comments.
jimweirich authored
147 rdoc.rdoc_dir = 'html'
157727c @jimweirich removed hanna setup from Rakefile
authored
148 rdoc.template = 'doc/jamis.rb'
8362f33 Fixed title.
jimweirich authored
149 rdoc.title = "Rake -- Ruby Make"
05ffed8 @jimweirich Modifed Rakefile to not require darkfish for the GemSpec
authored
150 rdoc.options = BASE_RDOC_OPTIONS.dup
9c4d005 @jimweirich added ability to use darkfish-rdoc if installed.
authored
151 rdoc.options << '-SHN' << '-f' << 'darkfish' if DARKFISH_ENABLED
152
c65dccd Switched to css2 template (for now)
jimweirich authored
153 rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
154 rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
155 rdoc.rdoc_files.exclude(/\bcontrib\b/)
9c4d005 @jimweirich added ability to use darkfish-rdoc if installed.
authored
156 end
47fb00b Added comments.
jimweirich authored
157
686d615 Added RubyGem support.
jimweirich authored
158 # ====================================================================
47fb00b Added comments.
jimweirich authored
159 # Create a task that will package the Rake software into distributable
686d615 Added RubyGem support.
jimweirich authored
160 # tar, zip and gem files.
161
162 PKG_FILES = FileList[
163 'install.rb',
164 '[A-Z]*',
165 'bin/**/*',
166 'lib/**/*.rb',
167 'test/**/*.rb',
ea538b2 Added explicit test task.
jimweirich authored
168 'test/**/*.rf',
169 'test/**/*.mf',
170 'test/**/Rakefile',
0c3268a fixed FistList order test bug. Mac extended attrs in tar. Missing subdir
jimweirich authored
171 'test/**/subdir',
686d615 Added RubyGem support.
jimweirich authored
172 'doc/**/*'
173 ]
4649238 removed temporary examples files from package spec
jimweirich authored
174 PKG_FILES.exclude('doc/example/*.o')
7ed9580 @jimweirich Fixed gemspec to exclude TAGS file.
authored
175 PKG_FILES.exclude('TAGS')
4649238 removed temporary examples files from package spec
jimweirich authored
176 PKG_FILES.exclude(%r{doc/example/main$})
686d615 Added RubyGem support.
jimweirich authored
177
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored
178 if ! defined?(Gem)
179 puts "Package Target requires RubyGEMs"
180 else
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored
181 SPEC = Gem::Specification.new do |s|
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored
182
183 #### Basic information.
184
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored
185 s.name = 'rake'
b2d9457 updating release procedure
jimweirich authored
186 s.version = $package_version
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored
187 s.summary = "Ruby based make-like utility."
188 s.description = <<-EOF
189 Rake is a Make-like program implemented in Ruby. Tasks
190 and dependencies are specified in standard Ruby syntax.
191 EOF
192
193 #### Dependencies and requirements.
194
195 #s.add_dependency('log4r', '> 1.0.4')
196 #s.requirements << ""
197
198 #### Which files are to be included in this gem? Everything! (Except CVS directories.)
199
0c88263 fixed gem building
jimweirich authored
200 s.files = PKG_FILES.to_a
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored
201
202 #### C code extensions.
203
204 #s.extensions << "ext/rmagic/extconf.rb"
205
206 #### Load-time details: library and application (you will need one or both).
207
208 s.require_path = 'lib' # Use these for libraries.
209
210 s.bindir = "bin" # Use these for applications.
211 s.executables = ["rake"]
212 s.default_executable = "rake"
213
214 #### Documentation and testing.
215
5649f91 Updated Gem Package Generation.
jimweirich authored
216 s.has_rdoc = true
3cd17e4 Updated Rakefile to support rdoc file lists and options.
jimweirich authored
217 s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
05ffed8 @jimweirich Modifed Rakefile to not require darkfish for the GemSpec
authored
218 s.rdoc_options = BASE_RDOC_OPTIONS
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored
219
220 #### Author and project details.
221
222 s.author = "Jim Weirich"
223 s.email = "jim@weirichhouse.org"
50e3ca7 pointed gem web page reference to the rake rubyforge page.
jimweirich authored
224 s.homepage = "http://rake.rubyforge.org"
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored
225 s.rubyforge_project = "rake"
618a61c Commented out the cert file stuff until rubygems fixes signing problem.
jimweirich authored
226 # if ENV['CERT_DIR']
227 # s.signing_key = File.join(ENV['CERT_DIR'], 'gem-private_key.pem')
228 # s.cert_chain = [File.join(ENV['CERT_DIR'], 'gem-public_cert.pem')]
229 # end
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored
230 end
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored
231
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored
232 package_task = Rake::GemPackageTask.new(SPEC) do |pkg|
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored
233 pkg.need_zip = true
234 pkg.need_tar = true
235 end
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored
236
eecc1ee @jimweirich bumped to version 0.8.1.7
authored
237 file "rake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t|
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored
238 require 'yaml'
239 open(t.name, "w") { |f| f.puts SPEC.to_yaml }
240 end
241
ad2a721 bumped to version 0.8.1.6
jimweirich authored
242 desc "Create a stand-alone gemspec"
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored
243 task :gemspec => "rake.gemspec"
0a5d4ac updated docs and comments. getting ready for 0.3.0
jimweirich authored
244 end
91ac08e Minor change.
jimweirich authored
245
686d615 Added RubyGem support.
jimweirich authored
246 # Misc tasks =========================================================
247
b461240 Lines task now counts all source files.
jimweirich authored
248 def count_lines(filename)
686d615 Added RubyGem support.
jimweirich authored
249 lines = 0
250 codelines = 0
b461240 Lines task now counts all source files.
jimweirich authored
251 open(filename) { |f|
252 f.each do |line|
686d615 Added RubyGem support.
jimweirich authored
253 lines += 1
254 next if line =~ /^\s*$/
255 next if line =~ /^\s*#/
256 codelines += 1
257 end
258 }
b461240 Lines task now counts all source files.
jimweirich authored
259 [lines, codelines]
260 end
261
262 def show_line(msg, lines, loc)
263 printf "%6s %6s %s\n", lines.to_s, loc.to_s, msg
264 end
265
266 desc "Count lines in the main rake file"
267 task :lines do
268 total_lines = 0
269 total_code = 0
270 show_line("File Name", "LINES", "LOC")
271 SRC_RB.each do |fn|
272 lines, codelines = count_lines(fn)
273 show_line(fn, lines, codelines)
274 total_lines += lines
275 total_code += codelines
276 end
277 show_line("TOTAL", total_lines, total_code)
686d615 Added RubyGem support.
jimweirich authored
278 end
279
47fb00b Added comments.
jimweirich authored
280 # Define an optional publish target in an external file. If the
281 # publish.rf file is not found, the publish targets won't be defined.
8934145 make contrib_test of sys work
jimweirich authored
282
283 load "publish.rf" if File.exist? "publish.rf"
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored
284
285 # Support Tasks ------------------------------------------------------
286
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
287 RUBY_FILES = FileList['**/*.rb'].exclude('pkg')
288
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored
289 desc "Look for TODO and FIXME tags in the code"
290 task :todo do
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
291 RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/)
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored
292 end
293
294 desc "Look for Debugging print lines"
295 task :dbg do
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
296 RUBY_FILES.egrep(/\bDBG|\bbreakpoint\b/)
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored
297 end
298
299 desc "List all ruby files"
300 task :rubyfiles do
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
301 puts RUBY_FILES
302 puts FileList['bin/*'].exclude('bin/*.rb')
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored
303 end
dd80335 Added rf abbreviation.
jimweirich authored
304 task :rf => :rubyfiles
da7cb40 Added release management to Rakefile
jimweirich authored
305
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored
306 desc "Create a TAGS file"
307 task :tags => "TAGS"
308
309 TAGS = 'xctags -e'
310
311 file "TAGS" => RUBY_FILES do
312 puts "Makings TAGS"
313 sh "#{TAGS} #{RUBY_FILES}", :verbose => false
314 end
315
da7cb40 Added release management to Rakefile
jimweirich authored
316 # --------------------------------------------------------------------
317 # Creating a release
318
d800e9b added dependency cycle detection
jimweirich authored
319 def plugin(plugin_name)
320 require "rake/plugins/#{plugin_name}"
321 end
322
323 task :noop
324 #plugin "release_manager"
325
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored
326 desc "Make a new release"
327 task :release, :rel, :reuse, :reltest,
328 :needs => [
329 :prerelease,
330 :clobber,
331 :test_all,
332 :update_version,
333 :package,
334 :tag
335 ] do
da7cb40 Added release management to Rakefile
jimweirich authored
336 announce
337 announce "**************************************************************"
b2d9457 updating release procedure
jimweirich authored
338 announce "* Release #{$package_version} Complete."
da7cb40 Added release management to Rakefile
jimweirich authored
339 announce "* Packages ready to upload."
340 announce "**************************************************************"
341 announce
342 end
343
344 # Validate that everything is ready to go for a release.
d34cb91 Ready for release
jimweirich authored
345 task :prerelease, :rel, :reuse, :reltest do |t, args|
346 $package_version = args.rel
da7cb40 Added release management to Rakefile
jimweirich authored
347 announce
348 announce "**************************************************************"
b2d9457 updating release procedure
jimweirich authored
349 announce "* Making RubyGem Release #{$package_version}"
da7cb40 Added release management to Rakefile
jimweirich authored
350 announce "* (current version #{CURRENT_VERSION})"
351 announce "**************************************************************"
352 announce
353
354 # Is a release number supplied?
d34cb91 Ready for release
jimweirich authored
355 unless args.rel
b2d9457 updating release procedure
jimweirich authored
356 fail "Usage: rake release[X.Y.Z] [REUSE=tag_suffix]"
da7cb40 Added release management to Rakefile
jimweirich authored
357 end
358
359 # Is the release different than the current release.
360 # (or is REUSE set?)
d34cb91 Ready for release
jimweirich authored
361 if $package_version == CURRENT_VERSION && ! args.reuse
b2d9457 updating release procedure
jimweirich authored
362 fail "Current version is #{$package_version}, must specify REUSE=tag_suffix to reuse version"
da7cb40 Added release management to Rakefile
jimweirich authored
363 end
364
365 # Are all source files checked in?
d34cb91 Ready for release
jimweirich authored
366 if args.reltest
da7cb40 Added release management to Rakefile
jimweirich authored
367 announce "Release Task Testing, skipping checked-in file test"
368 else
369 announce "Checking for unchecked-in files..."
b2d9457 updating release procedure
jimweirich authored
370 data = `svn st`
da7cb40 Added release management to Rakefile
jimweirich authored
371 unless data =~ /^$/
b2d9457 updating release procedure
jimweirich authored
372 abort "svn status is not clean ... do you have unchecked-in files?"
da7cb40 Added release management to Rakefile
jimweirich authored
373 end
374 announce "No outstanding checkins found ... OK"
375 end
376 end
377
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored
378 task :update_version, :rel, :reuse, :reltest,
d34cb91 Ready for release
jimweirich authored
379 :needs => [:prerelease] do |t, args|
380 if args.rel == CURRENT_VERSION
da7cb40 Added release management to Rakefile
jimweirich authored
381 announce "No version change ... skipping version update"
382 else
d34cb91 Ready for release
jimweirich authored
383 announce "Updating Rake version to #{args.rel}"
4c1c728 pre-tag commit
jimweirich authored
384 open("lib/rake.rb") do |rakein|
385 open("lib/rake.rb.new", "w") do |rakeout|
386 rakein.each do |line|
387 if line =~ /^RAKEVERSION\s*=\s*/
d34cb91 Ready for release
jimweirich authored
388 rakeout.puts "RAKEVERSION = '#{args.rel}'"
4c1c728 pre-tag commit
jimweirich authored
389 else
390 rakeout.puts line
391 end
392 end
393 end
da7cb40 Added release management to Rakefile
jimweirich authored
394 end
4c1c728 pre-tag commit
jimweirich authored
395 mv "lib/rake.rb.new", "lib/rake.rb"
d34cb91 Ready for release
jimweirich authored
396 if args.reltest
da7cb40 Added release management to Rakefile
jimweirich authored
397 announce "Release Task Testing, skipping commiting of new version"
398 else
d34cb91 Ready for release
jimweirich authored
399 sh %{svn commit -m "Updated to version #{args.rel}" lib/rake.rb} # "
da7cb40 Added release management to Rakefile
jimweirich authored
400 end
401 end
402 end
403
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored
404 desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
405 task :tag, :rel, :reuse, :reltest,
d34cb91 Ready for release
jimweirich authored
406 :needs => [:prerelease] do |t, args|
407 reltag = "REL_#{args.rel.gsub(/\./, '_')}"
408 reltag << args.reuse.gsub(/\./, '_') if args.reuse
178f8db working on release task
jimweirich authored
409 announce "Tagging Repository with [#{reltag}]"
d34cb91 Ready for release
jimweirich authored
410 if args.reltest
da7cb40 Added release management to Rakefile
jimweirich authored
411 announce "Release Task Testing, skipping CVS tagging"
412 else
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored
413 sh %{svn copy svn+ssh://rubyforge.org/var/svn/rake/trunk svn+ssh://rubyforge.org/var/svn/rake/tags/#{reltag} -m 'Commiting release #{reltag}'} ###'
da7cb40 Added release management to Rakefile
jimweirich authored
414 end
415 end
df6dea6 Clobber TAGS.
jimweirich authored
416
3096101 Added installation task for missing jamis template.
jimweirich authored
417 desc "Install the jamis RDoc template"
418 task :install_jamis_template do
419 require 'rbconfig'
420 dest_dir = File.join(Config::CONFIG['rubylibdir'], "rdoc/generators/template/html")
421 fail "Unabled to write to #{dest_dir}" unless File.writable?(dest_dir)
422 install "doc/jamis.rb", dest_dir, :verbose => true
423 end
424
df6dea6 Clobber TAGS.
jimweirich authored
425 # Require experimental XForge/Metaproject support.
426
427 load 'xforge.rf' if File.exist?('xforge.rf')
3210a02 Added require rubygems to a test, cleaning dot files, parameterized tar
jimweirich authored
428
d1f89d7 added task parameters, named parameter via desc, column limited output
jimweirich authored
429 desc "Where is the current directory. This task displays\nthe current rake directory"
3210a02 Added require rubygems to a test, cleaning dot files, parameterized tar
jimweirich authored
430 task :where_am_i do
431 puts Rake.original_dir
432 end
Something went wrong with that request. Please try again.