about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-17 02:55:00 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-17 12:34:49 -0700
commit382d12a414942f027ea30911294cd8c8becdf2cd (patch)
treeb2c1d44a18e5ac8585a031dddd4afaaaa9b1da65
parent9435ee2d5111394739b82d0f8a275deca8d505be (diff)
downloadunicorn-382d12a414942f027ea30911294cd8c8becdf2cd.tar.gz
No point in having those files under revision control or
repeating work to generate them.
-rw-r--r--.document2
-rw-r--r--.gitignore2
-rw-r--r--GNUmakefile15
-rw-r--r--Rakefile15
4 files changed, 32 insertions, 2 deletions
diff --git a/.document b/.document
index e30a0dd..f198e25 100644
--- a/.document
+++ b/.document
@@ -6,5 +6,7 @@ CONTRIBUTORS
 LICENSE
 SIGNALS
 TODO
+NEWS
+ChangeLog
 lib
 ext/unicorn_http/unicorn_http.c
diff --git a/.gitignore b/.gitignore
index 58f5e93..1872bac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,5 @@ ext/unicorn_http/unicorn_http.c
 log/
 pkg/
 /vendor
+/NEWS
+/ChangeLog
diff --git a/GNUmakefile b/GNUmakefile
index a3e0c5c..3d07600 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,6 +1,7 @@
 # use GNU Make to run tests in parallel, and without depending on Rubygems
 all:: test
 ruby = ruby
+rake = rake
 ragel = ragel
 RLFLAGS = -G2
 -include local.mk
@@ -128,8 +129,18 @@ Manifest:
         cmp $@+ $@ || mv $@+ $@
         $(RM) -f $@+
 
+NEWS:
+        $(rake) -s history > $@+
+        mv $@+ $@
+
+ChangeLog:
+        @echo ChangeLog from git://git.bogomips.org/unicorn.git > $@+
+        @echo >> $@+
+        git log | sed -e 's/^/    /' >> $@+
+        mv $@+ $@
+
 # using rdoc 2.4.1+
-doc: .document $(ext)/unicorn_http.c
+doc: .document $(ext)/unicorn_http.c NEWS ChangeLog
         rdoc -Na -t "$(shell sed -ne '1s/^= //p' README)"
         install -m644 COPYING doc/COPYING
         cd doc && ln README.html tmp.html && mv tmp.html index.html
@@ -153,4 +164,4 @@ $(T_r).%.r: export RAILS_GIT_REPO = $(CURDIR)/$(rails_git)
 $(T_r).%.r: $(test_prefix)/.stamp $(rails_git)/info/cloned-stamp
         $(run_test)
 
-.PHONY: doc $(T) $(slow_tests) Manifest
+.PHONY: doc $(T) $(slow_tests) Manifest ChangeLog
diff --git a/Rakefile b/Rakefile
index d06f780..c5e45ba 100644
--- a/Rakefile
+++ b/Rakefile
@@ -37,3 +37,18 @@ task :ragel do
     raise "Failed to build C source" unless File.exist? target
   end
 end
+
+desc 'prints RDoc-formatted history'
+task :history do
+  tags = `git tag -l`.split(/\n/).grep(/^v[\d\.]+$/).reverse
+  timefmt = '%Y-%m-%d %H:%M UTC'
+  tags.each do |tag|
+    header, subject, body = `git cat-file tag #{tag}`.split(/\n\n/, 3)
+    tagger = header.split(/\n/).grep(/^tagger /).first.split(/\s/)
+    time = Time.at(tagger[-2].to_i).utc
+    puts "=== #{tag.sub(/^v/, '')} / #{time.strftime(timefmt)}"
+    puts ""
+    puts body ? body.gsub(/^/sm, "  ") : "  initial"
+    puts ""
+  end
+end