about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-26 14:58:41 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-26 16:55:47 -0800
commit45db7aa7e9f00301332b019e1c033c7239c46ba2 (patch)
treeb0518393f858198f5b83a1c1367d07b0ac2a49f7
parentf67dadaf65a788c05ba8cd517204e85ee2c57130 (diff)
downloadrainbows-45db7aa7e9f00301332b019e1c033c7239c46ba2.tar.gz
Don't show ChangeLog for unreleased things
-rw-r--r--GNUmakefile7
-rw-r--r--local.mk.sample11
2 files changed, 10 insertions, 8 deletions
diff --git a/GNUmakefile b/GNUmakefile
index d2c0c1c..105241a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -65,9 +65,12 @@ NEWS: GIT-VERSION-FILE
         mv $@+ $@
 
 SINCE = 0.5.0
-ChangeLog: log_range = $(shell test -n "$(SINCE)" && echo v$(SINCE)..)
+ChangeLog: LOG_VERSION = \
+  $(shell git rev-parse -q "$(GIT_VERSION)" >/dev/null 2>&1 && \
+          echo $(GIT_VERSION) || git describe)
+ChangeLog: log_range = v$(SINCE)..$(LOG_VERSION)
 ChangeLog: GIT-VERSION-FILE
-        @echo "ChangeLog from $(GIT_URL) ($(SINCE)..$(GIT_VERSION))" > $@+
+        @echo "ChangeLog from $(GIT_URL) ($(log_range))" > $@+
         @echo >> $@+
         git log $(log_range) | sed -e 's/^/    /' >> $@+
         mv $@+ $@
diff --git a/local.mk.sample b/local.mk.sample
index 3672c89..cc8e16a 100644
--- a/local.mk.sample
+++ b/local.mk.sample
@@ -6,7 +6,7 @@
 
 DLEXT := so
 gems := rack-1.0.1
-# gems += unicorn-0.95.0 # installed via setup.rb
+# gems += unicorn-0.95.1 # installed via setup.rb
 gems += rev-0.3.1 iobuffer-0.1.1
 gems += eventmachine-0.12.10
 gems += async_sinatra-0.1.5 sinatra-0.9.4
@@ -51,20 +51,19 @@ latest: NEWS
 # publishes docs to http://rainbows.rubyforge.org
 publish_doc:
         -git set-file-times
-        $(RM) -r doc
-        $(MAKE) doc
+        $(RM) -r doc ChangeLog NEWS
+        $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
         $(MAKE) -s latest > doc/LATEST
         find doc/images doc/js -type f | \
                 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
         $(MAKE) doc_gz
         chmod 644 $$(find doc -type f)
-        rsync -av --delete doc/ \
-          rubyforge.org:/var/www/gforge-projects/rainbows/
+        rsync -av doc/ rubyforge.org:/var/www/gforge-projects/rainbows/
+        rsync -av doc/ dcvr:/srv/rainbows/
         git ls-files | xargs touch
 
 # Create gzip variants of the same timestamp as the original so nginx
 # "gzip_static on" can serve the gzipped versions directly.
-doc_gz: suf := html js css
 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
 doc_gz:
         touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"