From 1ad510d645e0c84c8d352ac0deaeefa75240ea94 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 27 Oct 2010 19:32:55 +0000 Subject: Rakefile: don't post freshmeat on empty changelogs We don't want to flood or monopolize freshmeat. --- Rakefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index c140b89..f345618 100644 --- a/Rakefile +++ b/Rakefile @@ -168,8 +168,12 @@ 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 -- cgit v1.2.3-24-ge0c7