diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-10-27 19:32:55 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-10-27 19:44:07 +0000 |
commit | 74dec350d93b88c0a5bd792239671097901e2393 (patch) | |
tree | 76d564c2a39040deab33a9234b48a7efcfffb0ac | |
parent | 10037f2aabb3fab4296fc90c615e7caa9f4a9b53 (diff) | |
download | unicorn-74dec350d93b88c0a5bd792239671097901e2393.tar.gz |
We don't want to flood or monopolize freshmeat. (cherry picked from commit 1ad510d645e0c84c8d352ac0deaeefa75240ea94)
-rw-r--r-- | Rakefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |