about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-10-26 21:36:02 +0000
committerEric Wong <normalperson@yhbt.net>2010-10-26 21:41:04 +0000
commit2b9503566759678c9fbd7b01d1b5f487854208db (patch)
treee66e3ad1592c51e59279366c998102d8077e0609 /Rakefile
parenta47cd4a7f392a76357ed4f3e458797ae1f9c8f25 (diff)
downloadrainbows-2b9503566759678c9fbd7b01d1b5f487854208db.tar.gz
We do prereleases, now.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index d2db54d..3736044 100644
--- a/Rakefile
+++ b/Rakefile
@@ -7,7 +7,7 @@ autoload :Tempfile, 'tempfile'
 def tags
   timefmt = '%Y-%m-%dT%H:%M:%SZ'
   @tags ||= `git tag -l`.split(/\n/).map do |tag|
-    if %r{\Av[\d\.]+\z} =~ tag
+    if %r{\Av[\d\.]+} =~ tag
       header, subject, body = `git cat-file tag #{tag}`.split(/\n\n/, 3)
       header = header.split(/\n/)
       tagger = header.grep(/\Atagger /).first
@@ -192,7 +192,11 @@ task :fm_update do
       "changelog" => changelog,
     },
   }.to_json
-  Net::HTTP.start(uri.host, uri.port) do |http|
-    p http.post(uri.path, req, {'Content-Type'=>'application/json'})
+  if ! changelog.strip.empty? && version =~ %r{\A[\d\.]+\d+\z}
+    Net::HTTP.start(uri.host, uri.port) do |http|
+      p http.post(uri.path, req, {'Content-Type'=>'application/json'})
+    end
+  else
+    warn "not updating freshmeat for v#{version}"
   end
 end