Skip to content
Newer
Older
100644 375 lines (309 sloc) 9.36 KB
de564de Initial revision
jimweirich authored Oct 18, 2003
1 # Rakefile for rake -*- ruby -*-
2
dd80335 Added rf abbreviation.
jimweirich authored Jan 17, 2006
3 # Copyright 2003, 2004, 2005 by Jim Weirich (jim@weirichhouse.org)
47fb00b Added comments.
jimweirich authored Nov 12, 2003
4 # All rights reserved.
5
ac681d3 modified rakefile to Bil Klebs suggestions
jimweirich authored Apr 16, 2006
6 # This file may be distributed under an MIT style license. See
47fb00b Added comments.
jimweirich authored Nov 12, 2003
7 # MIT-LICENSE for details.
8
922da4c @drbrain Re-exec with the local copy of rake to ensure the we're testing our code
drbrain authored Feb 14, 2011
9 require 'rbconfig'
eecdaf4 @drbrain Replace Rake::RDocTask with RDoc::Task
drbrain authored Jan 7, 2011
10 require 'rubygems'
922da4c @drbrain Re-exec with the local copy of rake to ensure the we're testing our code
drbrain authored Feb 14, 2011
11
12 system_rake = File.join RbConfig::CONFIG['rubylibdir'], 'rake.rb'
13
14 # Use our rake, not the installed rake from system
3680bf6 @drbrain Remove requirement for session gem from rake tests
drbrain authored Jul 22, 2011
15 if $".include? system_rake or $".grep(/rake\/name_space\.rb$/).empty? then
922da4c @drbrain Re-exec with the local copy of rake to ensure the we're testing our code
drbrain authored Feb 14, 2011
16 exec Gem.ruby, '-Ilib', 'bin/rake', *ARGV
17 end
18
eecdaf4 @drbrain Replace Rake::RDocTask with RDoc::Task
drbrain authored Jan 8, 2011
19 require 'rubygems/package_task'
922da4c @drbrain Re-exec with the local copy of rake to ensure the we're testing our code
drbrain authored Feb 14, 2011
20
2337d2a require clean was missing in the main Rakefile ... how could that be?
jimweirich authored Nov 12, 2003
21 require 'rake/clean'
1bd831f Started the splitup of rubyapp into smaller, reusable components (e.g…
jimweirich authored Nov 9, 2003
22 require 'rake/testtask'
eecdaf4 @drbrain Replace Rake::RDocTask with RDoc::Task
drbrain authored Jan 8, 2011
23
24 begin
25 gem 'rdoc'
26 require 'rdoc/task'
27 rescue Gem::LoadError
28 end
8bd21da Broke rubyapp into smaller pieces.
jimweirich authored Nov 11, 2003
29
f8d1b8b @jimweirich Updated RBC clean extensions.
authored May 17, 2009
30 CLEAN.include('**/*.o', '*.dot', '**/*.rbc')
5654c9f @drbrain Stop generating testdata, remove nonexistent files from clobber and p…
drbrain authored Jul 22, 2011
31 CLOBBER.include('doc/example/main')
df6dea6 Clobber TAGS.
jimweirich authored Sep 5, 2005
32 CLOBBER.include('TAGS')
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored Jul 22, 2007
33 CLOBBER.include('coverage', 'rcov_aggregate')
0482ac8 The Jamis rdoc template is only used if it is present.
jimweirich authored Mar 6, 2005
34
0c3268a fixed FistList order test bug. Mac extended attrs in tar. Missing subdir
jimweirich authored Jan 28, 2008
35 # Prevent OS X from including extended attribute junk in the tar output
36 ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
37
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
38 def announce(msg='')
39 STDERR.puts msg
40 end
0482ac8 The Jamis rdoc template is only used if it is present.
jimweirich authored Mar 6, 2005
41
47fb00b Added comments.
jimweirich authored Nov 12, 2003
42 # Determine the current version of the software
43
84da101 @jimweirich Bumped to 0.9.0.beta.0
authored Feb 22, 2011
44 if `ruby -Ilib ./bin/rake --version` =~ /rake, version ([0-9a-z.]+)$/
5e23db9 Make version detection more robust.
jimweirich authored Oct 4, 2005
45 CURRENT_VERSION = $1
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
46 else
47 CURRENT_VERSION = "0.0.0"
48 end
49
b2d9457 updating release procedure
jimweirich authored May 28, 2007
50 $package_version = CURRENT_VERSION
1bd831f Started the splitup of rubyapp into smaller, reusable components (e.g…
jimweirich authored Nov 9, 2003
51
b461240 Lines task now counts all source files.
jimweirich authored Mar 25, 2004
52 SRC_RB = FileList['lib/**/*.rb']
53
47fb00b Added comments.
jimweirich authored Nov 12, 2003
54 # The default task is run if rake is given no explicit arguments.
55
8bd21da Broke rubyapp into smaller pieces.
jimweirich authored Nov 11, 2003
56 desc "Default Task"
a4cceae @drbrain Move functional tests up to test/ and always run them
drbrain authored May 20, 2011
57 task :default => :test
de564de Initial revision
jimweirich authored Oct 18, 2003
58
9b9204a Changed test tasks back to using the rake provided task macros.
jimweirich authored Jul 11, 2004
59 # Test Tasks ---------------------------------------------------------
1bd831f Started the splitup of rubyapp into smaller, reusable components (e.g…
jimweirich authored Nov 9, 2003
60
fc94e50 @drbrain Merge contrib tests with all tests. Now there is only `rake test`
drbrain authored May 20, 2011
61 Rake::TestTask.new do |t|
0dba7c9 @drbrain Switch rake's tests to minitest
drbrain authored May 20, 2011
62 files = FileList['test/helper.rb', 'test/test_*.rb']
31d5cdc @jimweirich Switch to the :rake test task method.
authored Dec 4, 2012
63 t.loader = :rake
0dba7c9 @drbrain Switch rake's tests to minitest
drbrain authored May 21, 2011
64 t.test_files = files
fc94e50 @drbrain Merge contrib tests with all tests. Now there is only `rake test`
drbrain authored May 21, 2011
65 t.libs << "."
66 t.warning = true
a66153a @jimweirich Fixed up test location for r19 and rbx.
authored May 15, 2009
67 end
f521baa Added comments to test task.
jimweirich authored Jun 19, 2004
68
0c5500a Added existing and existing! methods to FileList.
jimweirich authored Apr 1, 2007
69 begin
70 require 'rcov/rcovtask'
b476e3d @jimweirich Removed XXXtask libraries from coverage consideration.
authored Mar 13, 2011
71 IGNORE_COVERAGE_IN = FileList[
72 'lib/rake/rdoctask.rb',
73 'lib/rake/testtask.rb',
74 'lib/rake/packagetask.rb',
75 'lib/rake/clean.rb',
76 ]
77
78 unless File::ALT_SEPARATOR
79 IGNORE_COVERAGE_IN.include(
80 'lib/rake/alt_system.rb',
81 'lib/rake/win32.rb')
82 end
0c5500a Added existing and existing! methods to FileList.
jimweirich authored Apr 1, 2007
83
84 Rcov::RcovTask.new do |t|
85 t.libs << "test"
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored Jul 22, 2007
86 t.rcov_opts = [
fcf0bb1 @jimweirich some refactoring and code cleanup. Better coverage
authored Sep 1, 2008
87 '-xRakefile', '-xrakefile', '-xpublish.rf',
7c9fc5b @jimweirich Exclude rvm directories from rcov.
authored Mar 13, 2011
88 '-xlib/rake/contrib', '-x/Library', '-x.rvm',
8519372 @jimweirich improved coverage
authored Sep 1, 2008
89 '--text-report',
fcf0bb1 @jimweirich some refactoring and code cleanup. Better coverage
authored Sep 1, 2008
90 '--sort coverage'
b476e3d @jimweirich Removed XXXtask libraries from coverage consideration.
authored Mar 14, 2011
91 ] + FileList['rakelib/*.rake'].pathmap("-x%p") +
92 IGNORE_COVERAGE_IN.map { |fn| "-x#{fn}" }
0c5500a Added existing and existing! methods to FileList.
jimweirich authored Apr 1, 2007
93 t.test_files = FileList[
4dda757 @jimweirich Fixed race condition in tests.
authored May 27, 2009
94 'test/lib/*_test.rb',
95 'test/contrib/*_test.rb',
96 'test/functional/*_test.rb'
0c5500a Added existing and existing! methods to FileList.
jimweirich authored Apr 1, 2007
97 ]
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored Jul 22, 2007
98 t.output_dir = 'coverage'
0c5500a Added existing and existing! methods to FileList.
jimweirich authored Apr 1, 2007
99 t.verbose = true
100 end
101 rescue LoadError
8049c7e @jimweirich Only complain about missing RCOV is it is actually requested.
authored Feb 22, 2011
102 task :rcov do
103 puts "RCov is not available"
104 end
c8197eb added rcov and unit tests
jimweirich authored Jun 1, 2006
105 end
106
9b9204a Changed test tasks back to using the rake provided task macros.
jimweirich authored Jul 11, 2004
107 # CVS Tasks ----------------------------------------------------------
47fb00b Added comments.
jimweirich authored Nov 12, 2003
108
109 # Install rake using the standard install.rb script.
8bd21da Broke rubyapp into smaller pieces.
jimweirich authored Nov 11, 2003
110
111 desc "Install the application"
112 task :install do
113 ruby "install.rb"
114 end
1bd831f Started the splitup of rubyapp into smaller, reusable components (e.g…
jimweirich authored Nov 9, 2003
115
47fb00b Added comments.
jimweirich authored Nov 12, 2003
116 # Create a task to build the RDOC documentation tree.
117
05ffed8 @jimweirich Modifed Rakefile to not require darkfish for the GemSpec
authored May 11, 2009
118 BASE_RDOC_OPTIONS = [
3bff3a1 @drbrain Join the future and use RDoc::Task!
drbrain authored Jan 8, 2011
119 '--line-numbers', '--show-hash',
120 '--main', 'README.rdoc',
f6d26a5 @jimweirich Updated rakefile to not generate darkfish in the gemspec.
authored May 11, 2009
121 '--title', 'Rake -- Ruby Make'
05ffed8 @jimweirich Modifed Rakefile to not require darkfish for the GemSpec
authored May 11, 2009
122 ]
123
3bff3a1 @drbrain Join the future and use RDoc::Task!
drbrain authored Jan 9, 2011
124 if defined?(RDoc::Task) then
125 RDoc::Task.new do |rdoc|
126 rdoc.rdoc_dir = 'html'
127 rdoc.title = "Rake -- Ruby Make"
128 rdoc.options = BASE_RDOC_OPTIONS.dup
2365bd2 @drbrain Remove trailing whitespace from rake
drbrain authored Jan 7, 2011
129
3bff3a1 @drbrain Join the future and use RDoc::Task!
drbrain authored Jan 9, 2011
130 rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGES')
131 rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
132 rdoc.rdoc_files.exclude(/\bcontrib\b/)
133 end
134 else
135 warn "RDoc 2.4.2+ is required to build documentation"
9c4d005 @jimweirich added ability to use darkfish-rdoc if installed.
authored Apr 22, 2009
136 end
47fb00b Added comments.
jimweirich authored Nov 12, 2003
137
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
138 # ====================================================================
47fb00b Added comments.
jimweirich authored Nov 12, 2003
139 # Create a task that will package the Rake software into distributable
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
140 # tar, zip and gem files.
141
142 PKG_FILES = FileList[
cb95956 @drbrain Be sure to package the .gemtest file too
drbrain authored Jan 25, 2011
143 '.gemtest',
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
144 'install.rb',
9efb73f @quix remove root directory glob for rake package files
quix authored Jul 31, 2011
145 'CHANGES',
146 'MIT-LICENSE',
147 'README.rdoc',
148 'Rakefile',
149 'TODO',
d8f2f65 @drbrain commit miss
drbrain authored Jul 22, 2011
150 'bin/rake',
2365bd2 @drbrain Remove trailing whitespace from rake
drbrain authored Jan 7, 2011
151 'lib/**/*.rb',
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
152 'test/**/*.rb',
153 'doc/**/*'
154 ]
4649238 removed temporary examples files from package spec
jimweirich authored Jul 2, 2004
155 PKG_FILES.exclude('doc/example/*.o')
7ed9580 @jimweirich Fixed gemspec to exclude TAGS file.
authored Apr 14, 2009
156 PKG_FILES.exclude('TAGS')
4649238 removed temporary examples files from package spec
jimweirich authored Jul 2, 2004
157 PKG_FILES.exclude(%r{doc/example/main$})
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
158
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored Nov 27, 2003
159 if ! defined?(Gem)
7804ae3 @drbrain Update README to remove version number and correct some discrepancies…
drbrain authored Jun 23, 2011
160 puts "Package Target requires RubyGems"
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored Nov 27, 2003
161 else
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored Aug 11, 2008
162 SPEC = Gem::Specification.new do |s|
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored Nov 27, 2003
163 s.name = 'rake'
b2d9457 updating release procedure
jimweirich authored May 28, 2007
164 s.version = $package_version
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored May 1, 2004
165 s.summary = "Ruby based make-like utility."
3680bf6 @drbrain Remove requirement for session gem from rake tests
drbrain authored Jul 23, 2011
166 s.description = <<-EOF.delete "\n"
167 Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
168 specified in standard Ruby syntax.
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored May 1, 2004
169 EOF
170
7804ae3 @drbrain Update README to remove version number and correct some discrepancies…
drbrain authored Jun 23, 2011
171 s.required_ruby_version = '>= 1.8.6'
e13d857 @drbrain Update Rakefile to use Gem::PackageTask
drbrain authored Jan 7, 2011
172 s.required_rubygems_version = '>= 1.3.2'
0dba7c9 @drbrain Switch rake's tests to minitest
drbrain authored May 21, 2011
173 s.add_development_dependency 'minitest', '~> 2.1'
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored May 1, 2004
174
0c88263 fixed gem building
jimweirich authored Nov 29, 2003
175 s.files = PKG_FILES.to_a
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored May 1, 2004
176
177 s.executables = ["rake"]
178
3bff3a1 @drbrain Join the future and use RDoc::Task!
drbrain authored Jan 9, 2011
179 s.extra_rdoc_files = FileList[
180 'README.rdoc',
181 'MIT-LICENSE',
182 'TODO',
183 'CHANGES',
184 'doc/**/*.rdoc'
185 ]
186
05ffed8 @jimweirich Modifed Rakefile to not require darkfish for the GemSpec
authored May 11, 2009
187 s.rdoc_options = BASE_RDOC_OPTIONS
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored May 1, 2004
188
189 s.author = "Jim Weirich"
190 s.email = "jim@weirichhouse.org"
50e3ca7 pointed gem web page reference to the rake rubyforge page.
jimweirich authored Nov 11, 2004
191 s.homepage = "http://rake.rubyforge.org"
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored May 1, 2004
192 s.rubyforge_project = "rake"
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored Nov 27, 2003
193 end
44fa75b Updated the gem spec to use almost all the options.
jimweirich authored May 1, 2004
194
7849e27 @jimweirich Removed unused variables from Rakefile
authored Mar 13, 2011
195 Gem::PackageTask.new(SPEC) do |pkg|
40ccfa2 Make RubyGems optional, but wont build packages without it.
jimweirich authored Nov 27, 2003
196 pkg.need_zip = true
197 pkg.need_tar = true
198 end
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored Aug 11, 2008
199
eecc1ee @jimweirich bumped to version 0.8.1.7
authored Aug 24, 2008
200 file "rake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t|
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored Aug 11, 2008
201 require 'yaml'
202 open(t.name, "w") { |f| f.puts SPEC.to_yaml }
203 end
204
ad2a721 bumped to version 0.8.1.6
jimweirich authored Aug 11, 2008
205 desc "Create a stand-alone gemspec"
4aaefed Added an explicit gemspec to the repo (for github gems)
jimweirich authored Aug 11, 2008
206 task :gemspec => "rake.gemspec"
0a5d4ac updated docs and comments. getting ready for 0.3.0
jimweirich authored Nov 22, 2003
207 end
91ac08e Minor change.
jimweirich authored Nov 28, 2003
208
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
209 # Misc tasks =========================================================
210
b461240 Lines task now counts all source files.
jimweirich authored Mar 25, 2004
211 def count_lines(filename)
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
212 lines = 0
213 codelines = 0
b461240 Lines task now counts all source files.
jimweirich authored Mar 25, 2004
214 open(filename) { |f|
215 f.each do |line|
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
216 lines += 1
217 next if line =~ /^\s*$/
218 next if line =~ /^\s*#/
219 codelines += 1
220 end
221 }
b461240 Lines task now counts all source files.
jimweirich authored Mar 25, 2004
222 [lines, codelines]
223 end
224
225 def show_line(msg, lines, loc)
226 printf "%6s %6s %s\n", lines.to_s, loc.to_s, msg
227 end
228
229 desc "Count lines in the main rake file"
230 task :lines do
231 total_lines = 0
232 total_code = 0
233 show_line("File Name", "LINES", "LOC")
234 SRC_RB.each do |fn|
235 lines, codelines = count_lines(fn)
236 show_line(fn, lines, codelines)
237 total_lines += lines
238 total_code += codelines
239 end
240 show_line("TOTAL", total_lines, total_code)
686d615 Added RubyGem support.
jimweirich authored Nov 16, 2003
241 end
242
47fb00b Added comments.
jimweirich authored Nov 12, 2003
243 # Define an optional publish target in an external file. If the
244 # publish.rf file is not found, the publish targets won't be defined.
8934145 make contrib_test of sys work
jimweirich authored Nov 11, 2003
245
246 load "publish.rf" if File.exist? "publish.rf"
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored Mar 25, 2005
247
248 # Support Tasks ------------------------------------------------------
249
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored Jul 22, 2007
250 RUBY_FILES = FileList['**/*.rb'].exclude('pkg')
251
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored Mar 25, 2005
252 desc "Look for TODO and FIXME tags in the code"
253 task :todo do
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored Jul 22, 2007
254 RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/)
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored Mar 25, 2005
255 end
256
257 desc "List all ruby files"
2365bd2 @drbrain Remove trailing whitespace from rake
drbrain authored Jan 7, 2011
258 task :rubyfiles do
e462afc Changes to get 100% code coverage in main rake.rb file.
jimweirich authored Jul 22, 2007
259 puts RUBY_FILES
260 puts FileList['bin/*'].exclude('bin/*.rb')
b412f1a Added support tasks to Rakefile: dbg, todo, and rubyfiles
jimweirich authored Mar 25, 2005
261 end
dd80335 Added rf abbreviation.
jimweirich authored Jan 17, 2006
262 task :rf => :rubyfiles
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
263
264 # --------------------------------------------------------------------
265 # Creating a release
266
d800e9b added dependency cycle detection
jimweirich authored Jul 4, 2007
267 def plugin(plugin_name)
268 require "rake/plugins/#{plugin_name}"
269 end
270
271 task :noop
272 #plugin "release_manager"
273
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored Dec 21, 2007
274 desc "Make a new release"
4ab3c72 @jimweirich Removed deprecated argument usage from Rakefile.
authored Mar 5, 2011
275 task :release, [:rel, :reuse, :reltest] => [
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored Dec 21, 2007
276 :prerelease,
277 :clobber,
a4cceae @drbrain Move functional tests up to test/ and always run them
drbrain authored May 20, 2011
278 :test,
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored Dec 21, 2007
279 :update_version,
280 :package,
281 :tag
282 ] do
2365bd2 @drbrain Remove trailing whitespace from rake
drbrain authored Jan 7, 2011
283 announce
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
284 announce "**************************************************************"
b2d9457 updating release procedure
jimweirich authored May 28, 2007
285 announce "* Release #{$package_version} Complete."
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
286 announce "* Packages ready to upload."
287 announce "**************************************************************"
2365bd2 @drbrain Remove trailing whitespace from rake
drbrain authored Jan 7, 2011
288 announce
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
289 end
290
291 # Validate that everything is ready to go for a release.
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
292 task :prerelease, :rel, :reuse, :reltest do |t, args|
293 $package_version = args.rel
2365bd2 @drbrain Remove trailing whitespace from rake
drbrain authored Jan 7, 2011
294 announce
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
295 announce "**************************************************************"
b2d9457 updating release procedure
jimweirich authored May 28, 2007
296 announce "* Making RubyGem Release #{$package_version}"
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
297 announce "* (current version #{CURRENT_VERSION})"
298 announce "**************************************************************"
2365bd2 @drbrain Remove trailing whitespace from rake
drbrain authored Jan 7, 2011
299 announce
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
300
301 # Is a release number supplied?
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
302 unless args.rel
b2d9457 updating release procedure
jimweirich authored May 28, 2007
303 fail "Usage: rake release[X.Y.Z] [REUSE=tag_suffix]"
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
304 end
305
306 # Is the release different than the current release.
307 # (or is REUSE set?)
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
308 if $package_version == CURRENT_VERSION && ! args.reuse
b2d9457 updating release procedure
jimweirich authored May 28, 2007
309 fail "Current version is #{$package_version}, must specify REUSE=tag_suffix to reuse version"
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
310 end
311
312 # Are all source files checked in?
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
313 if args.reltest
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
314 announce "Release Task Testing, skipping checked-in file test"
315 else
316 announce "Checking for unchecked-in files..."
b2d9457 updating release procedure
jimweirich authored May 28, 2007
317 data = `svn st`
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
318 unless data =~ /^$/
b2d9457 updating release procedure
jimweirich authored May 28, 2007
319 abort "svn status is not clean ... do you have unchecked-in files?"
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
320 end
321 announce "No outstanding checkins found ... OK"
322 end
323 end
324
4ab3c72 @jimweirich Removed deprecated argument usage from Rakefile.
authored Mar 5, 2011
325 task :update_version, [:rel, :reuse, :reltest] => [:prerelease] do |t, args|
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
326 if args.rel == CURRENT_VERSION
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
327 announce "No version change ... skipping version update"
328 else
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
329 announce "Updating Rake version to #{args.rel}"
4c1c728 pre-tag commit
jimweirich authored Mar 25, 2005
330 open("lib/rake.rb") do |rakein|
331 open("lib/rake.rb.new", "w") do |rakeout|
68c7a8c @drbrain Fix indentation
drbrain authored Jan 8, 2011
332 rakein.each do |line|
333 if line =~ /^RAKEVERSION\s*=\s*/
334 rakeout.puts "RAKEVERSION = '#{args.rel}'"
335 else
336 rakeout.puts line
337 end
338 end
4c1c728 pre-tag commit
jimweirich authored Mar 25, 2005
339 end
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
340 end
4c1c728 pre-tag commit
jimweirich authored Mar 25, 2005
341 mv "lib/rake.rb.new", "lib/rake.rb"
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
342 if args.reltest
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
343 announce "Release Task Testing, skipping commiting of new version"
344 else
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
345 sh %{svn commit -m "Updated to version #{args.rel}" lib/rake.rb} # "
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
346 end
347 end
348 end
349
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored Dec 21, 2007
350 desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
4ab3c72 @jimweirich Removed deprecated argument usage from Rakefile.
authored Mar 5, 2011
351 task :tag, [:rel, :reuse, :reltest] => [:prerelease] do |t, args|
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
352 reltag = "REL_#{args.rel.gsub(/\./, '_')}"
353 reltag << args.reuse.gsub(/\./, '_') if args.reuse
178f8db working on release task
jimweirich authored May 28, 2007
354 announce "Tagging Repository with [#{reltag}]"
d34cb91 Ready for release
jimweirich authored Dec 21, 2007
355 if args.reltest
da7cb40 Added release management to Rakefile
jimweirich authored Mar 25, 2005
356 announce "Release Task Testing, skipping CVS tagging"
357 else
32fef52 Changed argument specification to use task command rather than desc c…
jimweirich authored Dec 21, 2007
358 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 Mar 25, 2005
359 end
360 end
df6dea6 Clobber TAGS.
jimweirich authored Sep 5, 2005
361
362 # Require experimental XForge/Metaproject support.
363
364 load 'xforge.rf' if File.exist?('xforge.rf')
3210a02 Added require rubygems to a test, cleaning dot files, parameterized tar
jimweirich authored Feb 14, 2007
365
d1f89d7 added task parameters, named parameter via desc, column limited output
jimweirich authored May 26, 2007
366 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 Feb 14, 2007
367 task :where_am_i do
368 puts Rake.original_dir
369 end
de46c07 @jimweirich Task invocation chain now printed on errors.
authored May 26, 2009
370
371 task :failure => :really_fail
372 task :really_fail do
373 fail "oops"
374 end
Something went wrong with that request. Please try again.