public
Rubygem
Description: Apache Buildr
Homepage: http://incubator.apache.org/buildr
Clone URL: git://github.com/vic/buildr.git
Longest Rakefile Ever(tm) now broken up into separate pieces (see 
rakelib).
More necessary fixes to build process.
PDF building, not as problematic as before.


git-svn-id: https://svn.apache.org/repos/asf/incubator/buildr/trunk@641713 
13f79535-47bb-0310-9956-ffa450edef68
assaf (author)
Wed Mar 26 23:32:20 -0700 2008
commit  1956122701d890e6c8690da62aac756a31ba52d7
tree    0234aed71ab282547edaa52ce20eab6cdbc6dd53
parent  7b70f8e8f942e4ba46660d963b9a50339d296daa
...
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
...
52
53
54
55
56
57
 
58
59
 
 
 
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
 
88
89
90
...
100
101
102
103
104
105
106
107
108
109
110
111
112
 
 
 
 
 
 
 
 
113
114
 
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
 
 
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
 
 
 
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
...
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
...
49
50
51
 
 
 
52
53
 
54
55
56
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
59
60
61
...
71
72
73
 
 
 
 
 
 
 
 
 
 
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
92
93
94
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
 
 
 
 
 
97
98
99
100
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
 
0
@@ -13,29 +13,26 @@
0
 # License for the specific language governing permissions and limitations under
0
 # the License.
0
 
0
-require 'rubygems'
0
-require 'rake/gempackagetask'
0
-require 'rake/rdoctask'
0
-require 'spec/rake/spectask'
0
 
0
-# Gem specification comes first, other tasks rely on it.
0
-def specify(platform)
0
- Gem::Specification.new do |spec|
0
+# We need two specifications, for Ruby and Java, and one for the platform we run on.
0
+$specs = ['ruby', 'java'].inject({}) { |hash, platform|
0
+ spec = Gem::Specification.new do |spec|
0
     spec.name = 'buildr'
0
     spec.version = File.read(__FILE__.pathmap('%d/lib/buildr.rb')).scan(/VERSION\s*=\s*(['"])(.*)\1/)[0][1]
0
     spec.author = 'Apache Buildr'
0
     spec.email = 'buildr-user@incubator.apache.org'
0
     spec.homepage = "http://incubator.apache.org/#{spec.name}/"
0
     spec.summary = 'A build system that doesn\'t suck'
0
- spec.files = FileList['lib/**/*', 'README', 'CHANGELOG', 'LICENSE', 'NOTICE', 'DISCLAIMER',
0
- 'Rakefile', 'spec/**/*', 'doc/**/*'].to_ary
0
+ spec.files = FileList['lib/**/*', 'README', 'CHANGELOG', 'LICENSE', 'NOTICE', 'DISCLAIMER', 'KEYS',
0
+ 'Rakefile', 'rakelib/**/*', 'spec/**/*', 'doc/**/*'].to_ary
0
     spec.require_path = 'lib'
0
     spec.has_rdoc = true
0
- spec.extra_rdoc_files = ['README', 'CHANGELOG', 'LICENSE', 'NOTICE', 'DISCLAIMER']
0
+ spec.extra_rdoc_files = ['README', 'CHANGELOG', 'LICENSE', 'NOTICE', 'DISCLAIMER', 'site/buildr.pdf']
0
     spec.rdoc_options << '--title' << "Buildr -- #{spec.summary}" <<
0
                          '--main' << 'README' << '--line-numbers' << '--inline-source' << '-p' <<
0
                          '--webcvs' << 'http://svn.apache.org/repos/asf/incubator/buildr/trunk/'
0
     spec.rubyforge_project = 'buildr'
0
+ spec.platform = platform
0
 
0
     spec.bindir = 'bin' # Use these for applications.
0
     spec.executables = ['buildr']
0
@@ -52,39 +49,13 @@ def specify(platform)
0
     spec.add_dependency 'xml-simple', '~> 1.0'
0
     spec.add_dependency 'archive-tar-minitar', '~> 0.5'
0
     spec.add_dependency 'rubyforge', '~> 0.4'
0
-
0
- spec.platform = platform
0
- spec.add_dependency 'rjb', '~> 1.1' unless platform == 'java'
0
+ spec.add_dependency 'rjb', '~> 1.1' if platform =~ /ruby/
0
   end
0
-end
0
+ hash.update(platform=>spec)
0
+}
0
+$spec = $specs[RUBY_PLATFORM =~ /java/ ? 'java' : 'ruby']
0
 
0
-
0
-ruby_spec = specify(Gem::Platform::RUBY)
0
-ruby_package = Rake::GemPackageTask.new(ruby_spec) { |pkg| pkg.need_tar = pkg.need_zip = true }
0
-
0
-jruby_spec = specify('java')
0
-jruby_package = Rake::GemPackageTask.new(jruby_spec) { |pkg| pkg.need_tar = pkg.need_zip = false }
0
-
0
-begin
0
- require 'rubygems/dependency_installer'
0
- require 'rubygems/doc_manager'
0
- def install_gem(gem, options = {})
0
- say "Installing #{gem}..."
0
- installer = Gem::DependencyInstaller.new(gem, options.delete(:version), options)
0
- installer.install
0
- installer.installed_gems.each do |spec|
0
- Gem::DocManager.new(spec).generate_ri unless options[:ri] == false
0
- Gem::DocManager.new(spec).generate_rdoc unless options[:rdoc] == false
0
- end
0
- end
0
-rescue LoadError # < rubygems 1.0.1
0
- require 'rubygems/remote_installer'
0
- def install_gem(gem, options = {})
0
- say "Installing #{gem}..."
0
- Gem::RemoteInstaller.new.install(gem, options.delete(:version))
0
- say 'OK'
0
- end
0
-end
0
+$license_excluded = ['lib/core/progressbar.rb', 'spec/spec.opts', 'doc/css/syntax.css', '.textile', '.yaml']
0
 
0
 
0
 def ruby(*args)
0
@@ -100,345 +71,32 @@ end
0
 # Setup environment for running this Rakefile (RSpec, Docter, etc).
0
 desc "If you're building from sources, run this task one to setup the necessary dependencies."
0
 task 'setup' do
0
- # Install all Buildr and documentation dependencies.
0
- gems = Gem::SourceIndex.from_installed_gems
0
- dependencies = specify(RUBY_PLATFORM).dependencies
0
- dependencies << Gem::Dependency.new('docter', '~>1.1')
0
- dependencies << Gem::Dependency.new('rcov', '~>0.8') unless RUBY_PLATFORM =~ /java/
0
- dependencies.select { |dep| gems.search(dep.name, dep.version_requirements).empty? }.
0
- each do |dep|
0
- ruby 'install', dep.name, '-v', dep.version_requirements.to_s, :command=>'gem', :sudo=>true
0
- end
0
- #each { |dep| install_gem dep.name, :version=>dep.version_requirements }
0
+ dependencies = spec.dependencies
0
+ dependencies = dependencies.reject { |dep| dep.name == 'rjb' } if RUBY_PLATFORM =~ /java/
0
+ installed = Gem::SourceIndex.from_installed_gems
0
+ required = dependencies.select { |dep| installed.search(dep.name, dep.version_requirements).empty? }
0
+ required.each do |dep|
0
+ puts "Installing #{dep} ..."
0
+ ruby 'install', dep.name, '-v', dep.version_requirements.to_s, :command=>'gem', :sudo=>true
0
+ end
0
 end
0
 
0
+
0
 begin
0
   require 'highline/import'
0
 rescue LoadError
0
   puts 'HighLine required, please run rake setup first'
0
 end
0
 
0
-# Packaging and local installation.
0
-#
0
-desc 'Clean up all temporary directories used for running tests, creating documentation, packaging, etc.'
0
-task('clobber') { rm_rf 'pkg' }
0
-
0
-desc 'Install the package locally'
0
-task 'install'=>['clobber', 'package'] do |task|
0
- pkg = RUBY_PLATFORM =~ /java/ ? jruby_package : ruby_package
0
- ruby 'install', File.expand_path(pkg.gem_file, pkg.package_dir), :command=>'gem', :sudo=>true
0
-end
0
-
0
-desc 'Uninstall previously installed packaged'
0
-task 'uninstall' do |task|
0
- spec = RUBY_PLATFORM =~ /java/ ? jruby_spec : ruby_spec
0
- say "Uninstalling #{spec.name} ... "
0
- ruby 'install', spec.name, :command=>'gem', :sudo=>true
0
- say 'Done'
0
-end
0
-
0
-
0
-# Testing is everything.
0
-#
0
-task('clobber') { rm 'failing' rescue nil }
0
-
0
-desc 'Run all specs'
0
-Spec::Rake::SpecTask.new('spec') do |task|
0
- task.spec_files = FileList['spec/**/*_spec.rb']
0
- task.spec_opts << '--options' << 'spec/spec.opts' << '--format' << 'failing_examples:failing'
0
-end
0
-
0
-desc 'Run all failing examples from previous run'
0
-Spec::Rake::SpecTask.new('failing') do |task|
0
- task.spec_files = FileList['spec/**/*_spec.rb']
0
- task.spec_opts << '--options' << 'spec/spec.opts' << '--format' << 'failing_examples:failing' << '--example' << 'failing'
0
-end
0
-
0
-
0
-namespace 'spec' do
0
-
0
- directory('reports')
0
- Rake::Task['rake:clobber'].enhance { rm_rf 'reports' }
0
-
0
- desc 'Run all specs and generate specification and test coverage reports in html directory'
0
- Spec::Rake::SpecTask.new('full'=>'reports') do |task|
0
- task.spec_files = FileList['spec/**/*_spec.rb']
0
- task.spec_opts << '--format' << 'html:reports/specs.html' << '--backtrace'
0
- task.rcov = true
0
- task.rcov_dir = 'reports/coverage'
0
- task.rcov_opts = ['--exclude', 'spec,bin']
0
- end
0
-
0
- desc 'Run all specs specifically with Ruby'
0
- task('ruby') { system 'ruby -S rake spec' }
0
-
0
- desc 'Run all specs specifically with JRuby'
0
- task('jruby') { system 'jruby -S rake spec' }
0
-end
0
-
0
-
0
-# Documentation.
0
-#
0
-desc 'Generate RDoc documentation'
0
-rdoc = Rake::RDocTask.new(:rdoc) do |rdoc|
0
- rdoc.rdoc_dir = 'rdoc'
0
- rdoc.title = ruby_spec.name
0
- rdoc.options = ruby_spec.rdoc_options + ['--promiscuous']
0
- rdoc.rdoc_files.include('lib/**/*.rb')
0
- rdoc.rdoc_files.include ruby_spec.extra_rdoc_files
0
- begin
0
- gem 'allison'
0
- rdoc.template = File.expand_path('lib/allison.rb', Gem.loaded_specs['allison'].full_gem_path)
0
- rescue Exception
0
- end
0
-end
0
-
0
-desc 'Generate all documentation merged into the html directory'
0
-task 'docs'=>[rdoc.name]
0
-
0
-begin
0
- require 'docter'
0
- require 'docter/server'
0
-
0
- web_docs = {
0
- :collection => Docter.collection('Buildr').using('doc/web.toc.yaml').
0
- include('doc/pages', 'LICENSE', 'CHANGELOG'),
0
- :template => Docter.template('doc/web.haml').
0
- include('doc/css', 'doc/images', 'doc/scripts', 'reports/specs.html', 'reports/coverage', 'rdoc')
0
- }
0
- print_docs = {
0
- :collection => Docter.collection('Buildr').using('doc/print.toc.yaml').
0
- include('doc/pages', 'LICENSE'),
0
- :template => Docter.template('doc/print.haml').include('doc/css', 'doc/images')
0
- }
0
-
0
- #Docter.filter_for(:footnote) do |html|
0
- # html.gsub(/<p id="fn(\d+)">(.*?)<\/p>/, %{<p id="fn\\1" class="footnote">\\2</p>})
0
- #end
0
-
0
- desc 'Generate HTML documentation'
0
- html = Docter::Rake.generate('html', web_docs[:collection], web_docs[:template])
0
- html.enhance ['spec:full']
0
-
0
- desc 'Run Docter server'
0
- Docter::Rake.serve 'docter', web_docs[:collection], web_docs[:template], :port=>3000
0
- task('docs').enhance [html]
0
- task('clobber') { rm_rf html.to_s }
0
-
0
- if `which prince` =~ /prince/
0
- desc 'Produce PDF'
0
- print = Docter::Rake.generate('print', print_docs[:collection], print_docs[:template], :one_page)
0
- pdf = file('html/buildr.pdf'=>print) do |task|
0
- mkpath 'html'
0
- sh *%W{prince #{print}/index.html -o #{task.name} --media=print} do |ok, res|
0
- fail 'Failed to create PDF, see errors above' unless ok
0
- end
0
- end
0
- task('pdf'=>pdf) { |task| `open #{File.expand_path(pdf.to_s)}` }
0
- task('docs').enhance [pdf]
0
- task('clobber') { rm_rf print.to_s }
0
- end
0
-
0
-rescue LoadError
0
- puts "To generate site documentation, run rake setup first"
0
-end
0
 
0
+desc 'Clean up all temporary directories used for running tests, creating documentation, packaging, etc.'
0
+task 'clobber'
0
 
0
 namespace 'release' do
0
-
0
- # This task does all prerequisites checks before starting the release, for example,
0
- # that we have Groovy and Scala to run all the test cases, or that we have Allison
0
- # and PrinceXML to generate the full documentation.
0
- task 'check'=>'setup'
0
- # This task does all the preparation work before making a release and also checks
0
- # that we generate all the right material, for example, that we compiled Java sources,
0
- # created the PDF, have coverage report.
0
- task 'prepare'=>['clobber', 'check']
0
-
0
- # Does CHANGELOG reflects current release?
0
- task 'check' do
0
- say 'Checking that CHANGELOG indicates most recent version and today\'s date ... '
0
- expecting = "#{ruby_spec.version} (#{Time.now.strftime('%Y-%m-%d')})"
0
- header = File.readlines('CHANGELOG').first
0
- fail "Expecting CHANGELOG to start with #{expecting}, but found #{header} instead" unless expecting == header
0
- say 'OK'
0
- end
0
-
0
- # License requirement.
0
- task 'check' do
0
- say 'Checking that files contain the Apache license ... '
0
- directories = 'lib', 'spec', 'docs', 'bin'
0
- ignore = 'class', 'opts'
0
- FileList['lib/**/*', 'spec/**/*', 'bin/**', 'doc/css/*', 'doc/scripts/*'].
0
- exclude('doc/css/syntax.css').reject { |file| File.directory?(file) || ignore.include?(file[/[^.]*$/]) }.each do |file|
0
- comments = File.read(file).scan(/(\/\*(.*?)\*\/)|^#\s+(.*?)$|<!--(.*?)-->/m).
0
- map { |match| match.reject(&:nil?) }.flatten.join("\n")
0
- fail "File #{file} missing Apache License, please add it before making a release!" unless
0
- comments =~ /Licensed to the Apache Software Foundation/ && comments =~ /http:\/\/www.apache.org\/licenses\/LICENSE-2.0/
0
- end
0
- say 'OK'
0
- end
0
-
0
- # No local changes.
0
- task 'check' do
0
- status = `svn status`
0
- fail "Cannot release unless all local changes are in SVN:\n#{status}" unless status.empty?
0
- end
0
-
0
- # Re-generate Java extensions and to this before running test cases.
0
- task 'compile' do
0
- say 'Compiling Java libraries ... '
0
- cmd = [ RUBY_PLATFORM =~ /java/ ? 'jruby' : 'ruby' ] <<
0
- '-I' << File.join(File.dirname(__FILE__), 'lib') <<
0
- File.join(File.dirname(__FILE__), 'bin', 'buildr') <<
0
- 'compile'
0
- system *cmd
0
- say 'OK'
0
- end
0
-
0
- # Tests, specs and coverage reports.
0
- task 'check' do
0
- say 'Checking that we have JRuby, Scala and Groovy available ... '
0
- fail 'Full testing requires JRuby!' if `which jruby`.empty?
0
- fail 'Full testing requires Scala!' if `which scalac`.empty? || ENV['SCALA_HOME'].to_s.empty?
0
- fail 'Full testing requires Groovy!' if `which groovyc`.empty?
0
- say 'OK'
0
- end
0
- task 'prepare'=>'compile' do
0
- say 'Running test suite using JRuby ...'
0
- task('spec:jruby').invoke
0
- say 'Running test suite using Ruby ...'
0
- task('spec:ruby').invoke
0
- say 'Done'
0
- end
0
-
0
- # Documentation (derived from above).
0
- task 'check' do
0
- say 'Checking that we can use Allison and PrinceXML ... '
0
- fail 'Release requires the Allison RDoc template, please gem install allison!' unless rdoc.template =~ /allison.rb/
0
- fail 'Release requires PrinceXML to generate PDF documentation!' if `which prince`.empty?
0
- say 'OK'
0
- end
0
- task 'prepare'=>'spec:full' do
0
- say 'Generating RDocs and PDF ...'
0
- task('docs').invoke
0
- say 'Done'
0
 
0
- say 'Checking that we have PDF, RDoc, specs and coverage report ... '
0
- fail 'No RDocs if html/rdoc!' unless File.exist?('html/rdoc/files/lib/buildr_rb.html')
0
- fail 'No PDF generated, you need to install PrinceXML!' unless File.exist?('html/buildr.pdf')
0
- fail 'No specifications in html directory!' unless File.exist?('html/specs.html')
0
- fail 'No coverage reports in html/coverage directory!' unless File.exist?('html/coverage/index.html')
0
- say 'OK'
0
+ task 'make' do
0
+ task('rubyforge').invoke
0
+ task('apache:upload').invoke('buildr', true)
0
   end
0
 
0
- task 'check' do
0
- require 'rubyforge' rescue fail 'RubyForge required, please gem install rubyforge!'
0
- fail 'GnuPG required to create signatures!' if `which gpg`.empty?
0
- gpg_user = ENV['GPG_USER'] or fail 'Please set GPG_USER (--local-user) environment variable so we know which key to use.'
0
- sh('gpg', '--list-key', gpg_user) { |ok, res| ok or fail "No key matches for GPG_USER=#{gpg_user}" }
0
- end
0
-
0
-
0
- # Cut the release: upload Gem to RubyForge before updating site (fail safe).
0
- task 'cut'=>['upload:rubyforge', 'upload:site']
0
-
0
-
0
- namespace 'upload' do
0
- # Upload site (html directory) to Apache.
0
- task 'site'=>'rake:docs' do
0
- say 'Uploading Web site to people.apache.org ... '
0
- args = Dir.glob('html/*') + ['people.apache.org:/www/incubator.apache.org/' + ruby_spec.rubyforge_project.downcase]
0
- verbose(false) { sh 'rsync ', '-r', '--del', '--progress', *files }
0
- say 'Done'
0
- end
0
-
0
- # Upload Gems to RubyForge.
0
- task 'rubyforge'=>['rake:docs', 'rake:package'] do
0
- require 'rubyforge'
0
-
0
- # Read the changes for this release.
0
- say 'Looking for changes between this release and previous one ... '
0
- pattern = /(^(\d+\.\d+(?:\.\d+)?)\s+\(\d{4}-\d{2}-\d{2}\)\s*((:?^[^\n]+\n)*))/
0
- changelog = File.read(__FILE__.pathmap('%d/CHANGELOG'))
0
- changes = changelog.scan(pattern).inject({}) { |hash, set| hash[set[1]] = set[2] ; hash }
0
- current = changes[ruby_spec.version.to_s]
0
- current = changes[ruby_spec.version.to_s.split('.')[0..-2].join('.')] if !current && ruby_spec.version.to_s =~ /\.0$/
0
- fail "No changeset found for version #{ruby_spec.version}" unless current
0
- say 'OK'
0
-
0
- say "Uploading #{ruby_spec.version} to RubyForge ... "
0
- files = Dir.glob('pkg/*.{gem,tgz,zip}')
0
- rubyforge = RubyForge.new
0
- rubyforge.login
0
- File.open('.changes', 'w'){|f| f.write(current)}
0
- rubyforge.userconfig.merge!('release_changes' => '.changes', 'preformatted' => true)
0
- rubyforge.add_release ruby_spec.rubyforge_project.downcase, ruby_spec.name.downcase, ruby_spec.version, *files
0
- rm '.changes'
0
- say 'Done'
0
- end
0
-
0
- task 'apache'=>['rake:package'] do
0
- require 'md5'
0
- require 'sha1'
0
-
0
- gpg_user = ENV['GPG_USER'] or fail 'Please set GPG_USER (--local-user) environment variable so we know which key to use.'
0
- say 'Creating -incubating packages ... '
0
- rm_rf 'incubating'
0
- mkpath 'incubating'
0
- packages = FileList['pkg/*.{gem,zip,tgz}'].map do |package|
0
- package.pathmap('incubating/%n-incubating%x').tap do |incubating|
0
- cp package, incubating
0
- end
0
- end
0
- say 'Done'
0
-
0
- say 'Signing -incubating packages ... '
0
- files = packages.each do |package|
0
- binary = File.read(package)
0
- File.open(package + '.md5', 'w') { |file| file.write MD5.hexdigest(binary) << ' ' << package }
0
- File.open(package + '.sha1', 'w') { |file| file.write SHA1.hexdigest(binary) << ' ' << package }
0
- sh 'gpg', '--local-user', gpg_user, '--armor', '--output', package + '.asc', '--detach-sig', package, :verbose=>true
0
- [package, package + '.md5', package + '.sha1', package + '.asc']
0
- end
0
- say 'Done'
0
-
0
- say 'Uploading packages to Apache dist ... '
0
- args = files.flatten << 'KEYS' << 'people.apache.org:/www.apache.org/dist/incubator/buildr/'
0
- verbose(false) { sh 'rsync', '-progress', *args }
0
- say 'Done'
0
- end
0
- Rake::Task['rake:clobber'].enhance { rm_rf 'incubating' }
0
-
0
- end
0
-
0
-
0
- # Tag this release in SVN.
0
- task 'tag' do
0
- say "Tagging release as tags/#{ruby_spec.version} ... "
0
- cur_url = `svn info`.scan(/URL: (.*)/)[0][0]
0
- new_url = cur_url.sub(/(trunk$)|(branches\/\w*)$/, "tags/#{ruby_spec.version.to_s}")
0
- sh 'svn', 'copy', cur_url, new_url, '-m', "Release #{ruby_spec.version.to_s}", :verbose=>false
0
- say "OK"
0
- end
0
-
0
- # Update lib/buildr.rb to next vesion number, add new entry in CHANGELOG.
0
- task 'next_version'=>'tag' do
0
- next_version = ruby_spec.version.to_ints.zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
0
- say "Updating lib/buildr.rb to next version number (#{next_version}) ... "
0
- buildr_rb = File.read(__FILE__.pathmap('%d/lib/buildr.rb')).
0
- sub(/(VERSION\s*=\s*)(['"])(.*)\2/) { |line| "#{$1}#{$2}#{next_version}#{$2}" }
0
- File.open(__FILE__.pathmap('%d/lib/buildr.rb'), 'w') { |file| file.write buildr_rb }
0
- say "OK"
0
-
0
- say 'Adding new entry to CHANGELOG ... '
0
- changelog = File.read(__FILE__.pathmap('%d/CHANGELOG'))
0
- File.open(__FILE__.pathmap('%d/CHANGELOG'), 'w') { |file| file.write "#{next_version} (Pending)\n\n#{changelog}" }
0
- say "OK"
0
- end
0
-
0
- # Wrapup comes after cut, and does things like tagging in SVN, updating Buildr version number, etc.
0
- task 'wrapup'=>['tag', 'next_version']
0
 end
0
-
0
-task 'release'=>['release:prepare', 'release:cut', 'release:wrapup']
...
18
19
20
21
 
22
23
24
...
41
42
43
44
45
46
47
48
49
...
78
79
80
81
 
82
83
84
...
18
19
20
 
21
22
23
24
...
41
42
43
 
 
 
44
45
46
...
75
76
77
 
78
79
80
81
0
@@ -18,7 +18,7 @@
0
 body {
0
   background-color: #fff;
0
   color: #000;
0
- font-family: "DejaVu Sans", Verdana, Helvetica, sans-serif;
0
+ font-family: "DejaVu Sans", Verdana, Helvetica;
0
   text-align: center;
0
   line-height: 1.5em;
0
 }
0
@@ -41,9 +41,6 @@ pre { padding: 1em; }
0
 pre.wrapped {
0
   white-space: pre-wrap; /* css-3 */
0
   white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
0
- white-space: -pre-wrap; /* Opera 4-6 */
0
- white-space: -o-pre-wrap; /* Opera 7 */
0
- word-wrap: break-word;
0
 }
0
 
0
 h1, h2, h3 {
0
@@ -78,7 +75,7 @@ blockquote {
0
 }
0
 
0
 ul {
0
- list-style-ty pe: disc;
0
+ list-style-type: disc;
0
 }
0
 
0
 ul ul {
...
16
17
18
 
 
 
19
20
21
...
54
55
56
57
 
58
59
60
...
89
90
91
92
93
94
...
16
17
18
19
20
21
22
23
24
...
57
58
59
 
60
61
62
63
...
92
93
94
 
 
95
0
@@ -16,6 +16,9 @@
0
 
0
 
0
 @page { margin: 1in 0.75in 1in 0.75in; }
0
+@page {
0
+ font-family: "DejaVu Sans", Verdana, Helvetica;
0
+}
0
 @page:left {
0
   @top-left { content: counter(page); }
0
   @top-right { content: string(pagetitle); }
0
@@ -54,7 +57,7 @@ pre {
0
 }
0
 a:link, a:visited {
0
   background: transparent;
0
- text-decoration: underline;
0
+ text-decoration: none;
0
 }
0
 
0
 
0
@@ -89,6 +92,4 @@ ol.toc a:after { content: leader('.') target-counter(attr(href), page); }
0
 
0
 #license {
0
   padding-top: 1in;
0
- page-break-before: none !important;
0
- page-break-inside: always !important;
0
 }
...
3
4
5
6
 
7
8
9
...
23
24
25
26
27
 
 
28
29
30
...
32
33
34
35
36
 
 
37
38
39
...
3
4
5
 
6
7
8
9
...
23
24
25
 
 
26
27
28
29
30
...
32
33
34
 
 
35
36
37
38
39
0
@@ -3,7 +3,7 @@
0
  */
0
 
0
 .ruby .normal {}
0
-.ruby .comment { color: #005; font-style: italic; }
0
+.ruby .comment { color: #7f7f7f; }
0
 .ruby .keyword { color: #A00; font-weight: bold; }
0
 .ruby .method { color: #077; }
0
 .ruby .class { color: #074; }
0
@@ -23,8 +23,8 @@
0
 
0
 .xml .normal {}
0
 .xml .namespace { color: #B66; font-weight: bold; }
0
-.xml .tag { color: #F88; }
0
-.xml .comment { color: #005; font-style: italic; }
0
+.xml .tag { color: #4c00ff; }
0
+.xml .comment { color: #7f7f7f; }
0
 .xml .punct { color: #447; font-weight: bold; }
0
 .xml .string { color: #944; }
0
 .xml .number { color: #F99; }
0
@@ -32,8 +32,8 @@
0
 
0
 .yaml .document { }
0
 .yaml .type { }
0
-.yaml .key { color: #00c0c0 }
0
-.yaml .comment { color: #808080 }
0
+.yaml .key { color: #4c00ff}
0
+.yaml .comment { color: #7f7f7f; }
0
 .yaml .punct { }
0
 .yaml .string { }
0
 .yaml .number { }
...
18
19
20
21
22
 
 
 
23
24
25
...
18
19
20
 
 
21
22
23
24
25
26
0
@@ -18,8 +18,9 @@
0
   %head
0
     %meta{ 'http-equiv'=>'Content-Type', :content=>'text/html;charset=UTF-8' }/
0
     %title= "#{collection.title} &mdash; #{page.title}"
0
- %link{ :rel=>'stylesheet', :type=>'text/css', :href=>'css/default.css' }
0
- %link{ :rel=>'stylesheet', :type=>'text/css', :href=>'css/syntax.css' }
0
+ %style{ :type=>'text/css' }
0
+ @import 'css/default.css';
0
+ @import 'css/syntax.css';
0
     %style{ :type=>'text/css', :media=>'print' }
0
       @import 'css/print.css';
0
       \#header { display: none }

Comments

    No one has commented yet.