You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/04/25 09:59:16 UTC
svn commit: r651523 - in /incubator/buildr/trunk/rakelib: changelog.rake
doc.rake
Author: assaf
Date: Fri Apr 25 00:59:12 2008
New Revision: 651523
URL: http://svn.apache.org/viewvc?rev=651523&view=rev
Log:
Fix to handling of CHANGES file
Modified:
incubator/buildr/trunk/rakelib/changelog.rake
incubator/buildr/trunk/rakelib/doc.rake
Modified: incubator/buildr/trunk/rakelib/changelog.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/changelog.rake?rev=651523&r1=651522&r2=651523&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/changelog.rake (original)
+++ incubator/buildr/trunk/rakelib/changelog.rake Fri Apr 25 00:59:12 2008
@@ -25,14 +25,15 @@
puts 'OK'
end
- task 'prepare'=>'CHANGELOG' do
+ file 'staged/CHANGES'=>'CHANGELOG' do |task|
# Read the changes for this release.
print 'Looking for changes between this release and previous one ... '
pattern = /(^(\d+\.\d+(?:\.\d+)?)\s+\(\d{4}-\d{2}-\d{2}\)\s*((:?^[^\n]+\n)*))/
changes = File.read('CHANGELOG').scan(pattern).inject({}) { |hash, set| hash[set[1]] = set[2] ; hash }
current = changes[spec.version.to_s]
fail "No changeset found for version #{spec.version}" unless current
- File.open 'stage/CHANGES', 'w' do |file|
+ File.open task.name, 'w' do |file|
+ file.write "#{spec.version} (#{Time.now.strftime('%Y-%m-%d')})\n"
file.write current
end
puts 'OK'
@@ -51,5 +52,5 @@
end
task 'stage:check'=>'changelog:check'
-task 'stage:prepare'=>'changelog:prepare'
+task 'stage:prepare'=>'staged/CHANGES'
task 'release:wrapup'=>'changelog:wrapup'
Modified: incubator/buildr/trunk/rakelib/doc.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/doc.rake?rev=651523&r1=651522&r2=651523&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/doc.rake (original)
+++ incubator/buildr/trunk/rakelib/doc.rake Fri Apr 25 00:59:12 2008
@@ -34,7 +34,7 @@
task 'setup' do
install_gem 'allison'
end
- task 'release:check' do
+ task 'stage:check' do
fail 'Please run rake setup to install the Allison RDoc template'
end
end
@@ -92,22 +92,12 @@
puts 'OK'
end
- task 'site:stage' do
- puts 'Copying site over to release directory ...'
- cp_r 'site', 'release'
- puts 'Done'
- end
-
rescue LoadError
puts 'Please run rake setup to install the Docter document generation library'
task 'setup' do
install_gem 'docter', '~>1.1.3'
end
- task 'release:check' do
+ task 'stage:check' do
fail 'Please run rake setup to install the Docter document generation library'
end
end
-
-
-task 'release:prepare'=>'site:prepare'
-task 'release:stage'=>'site:stage'