From 2b9503566759678c9fbd7b01d1b5f487854208db Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 26 Oct 2010 21:36:02 +0000 Subject: Rakefile: updates for prereleases We do prereleases, now. --- Rakefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Rakefile') 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 -- cgit v1.2.3-24-ge0c7