summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-02-15 15:01:48 +0000
committerJamis Buck <jamis@37signals.com>2005-02-15 15:01:48 +0000
commit43c69d86c38b33461bd954c0a0b6d2017741c851 (patch)
treeb59833c129dc6964fc055dc2ab9335a9f1cecb96
parent693469bc5987f111db8fc6b4ee6916893954d180 (diff)
downloadthird_party-sqlite3-ruby-43c69d86c38b33461bd954c0a0b6d2017741c851.tar.gz
third_party-sqlite3-ruby-43c69d86c38b33461bd954c0a0b6d2017741c851.tar.xz
third_party-sqlite3-ruby-43c69d86c38b33461bd954c0a0b6d2017741c851.zip
ChangeLog is dynamically generated again.
-rw-r--r--ChangeLog.cvs (renamed from ChangeLog)31
-rw-r--r--Rakefile18
-rw-r--r--util/svn2cl.rb29
3 files changed, 41 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog.cvs
index 1efe4e6..6e9dd51 100644
--- a/ChangeLog
+++ b/ChangeLog.cvs
@@ -1,34 +1,3 @@
-2005-02-06 12:19 jamis
-
- * Fixed problem with /usr/local sqlite includes not being found. Hopefully.
-
-2005-02-05 11:24 jamis
-
- * The bind parameter array will be flattened before use, so that arrays
- may be passed as parameters.
- * The native bind_text implementation does a to_s on the parameter
-
-2005-01-30 22:14 jamis
-
- * Added various bsds to the detection routine in dl/api.rb.
-
-2005-01-30 22:12 jamis
-
- * Fixed deprecation warnings in faq.rb about Object#id.
-
-2005-01-25 14:58 jamis
-
- * Changed extconf.rb to allow /usr/local sqlite3 installations to be
- supported "out-of-the-box".
-
-2005-01-09 08:04 jamis
-
- * Changed layout to support tagging and branching
-
-2005-01-07 14:32 jamis
-
- * Move from CVS
-
2005-01-05 09:40 minam
* Rakefile, sqlite3-ruby-win32.gemspec, sqlite3-ruby.gemspec: Added
diff --git a/Rakefile b/Rakefile
index 932b8d4..cb57ed2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -14,7 +14,6 @@ SOURCE_FILES = FileList.new do |fl|
fl.include "#{dir}/**/*"
end
fl.include "Rakefile"
- fl.exclude( /\bCVS\b/ )
end
PACKAGE_FILES = FileList.new do |fl|
@@ -23,7 +22,6 @@ PACKAGE_FILES = FileList.new do |fl|
end
fl.include "ChangeLog", "README", "LICENSE", "#{PACKAGE_NAME}.gemspec", "setup.rb"
fl.include SOURCE_FILES
- fl.exclude( /\bCVS\b/ )
end
Gem.manage_gems
@@ -40,8 +38,16 @@ end
desc "Default task"
task :default => [ :test ]
+desc "Build the ChangeLog"
+task :changelog do
+ output = `ruby util/svn2cl.rb`
+ cvs = File.read( "ChangeLog.cvs" )
+ File.open( "ChangeLog", "w" ) { |f| f.write output + cvs }
+end
+
desc "Clean generated files"
task :clean do
+ rm_rf "ChangeLog"
rm_rf "pkg"
rm_rf "api"
rm_f "doc/faq/faq.html"
@@ -85,10 +91,10 @@ bz2_file = "#{package_name}.tar.bz2"
zip_file = "#{package_name}.zip"
gem_file = "#{package_name}.gem"
-task :gzip => SOURCE_FILES + [ :faq, :rdoc, "#{package_dir}/#{gz_file}" ]
-task :bzip => SOURCE_FILES + [ :faq, :rdoc, "#{package_dir}/#{bz2_file}" ]
-task :zip => SOURCE_FILES + [ :faq, :rdoc, "#{package_dir}/#{zip_file}" ]
-task :gem => SOURCE_FILES + [ :faq, "#{package_dir}/#{gem_file}" ]
+task :gzip => SOURCE_FILES + [ :changelog, :faq, :rdoc, "#{package_dir}/#{gz_file}" ]
+task :bzip => SOURCE_FILES + [ :changelog, :faq, :rdoc, "#{package_dir}/#{bz2_file}" ]
+task :zip => SOURCE_FILES + [ :changelog, :faq, :rdoc, "#{package_dir}/#{zip_file}" ]
+task :gem => SOURCE_FILES + [ :changelog, :faq, "#{package_dir}/#{gem_file}" ]
task :package => [ :gzip, :bzip, :zip, :gem ]
diff --git a/util/svn2cl.rb b/util/svn2cl.rb
new file mode 100644
index 0000000..fe5216e
--- /dev/null
+++ b/util/svn2cl.rb
@@ -0,0 +1,29 @@
+#!/usr/bin/env ruby
+
+require 'time'
+
+def wrap( text, column, indent="" )
+ wrapped = ""
+ while text.length > column
+ break_at = text.rindex( /[-\s]/, column ) || column
+ line = text[0,break_at+1].strip
+ text = text[break_at+1..-1].strip
+ wrapped << indent << line << "\n"
+ end
+ wrapped << indent << text
+end
+
+output = `svn log`.split( /^-----*\n/ )
+
+output[1..-2].each do |change|
+ lines = change.split(/\n/)
+ revision, user, stamp, size = lines.shift.split( /\|/ )
+ lines.shift
+ msg = lines.join(' ')
+ date, time = stamp.match( /(\d\d\d\d-\d\d-\d\d) (\d\d:\d\d):\d\d/ )[1,2]
+
+ puts "#{date} #{time} #{user.strip}"
+ puts
+ puts "\t* #{wrap(msg,60,"\t ").strip}"
+ puts
+end