diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-10-26 21:36:02 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-10-26 21:41:04 +0000 |
commit | 2b9503566759678c9fbd7b01d1b5f487854208db (patch) | |
tree | e66e3ad1592c51e59279366c998102d8077e0609 | |
parent | a47cd4a7f392a76357ed4f3e458797ae1f9c8f25 (diff) | |
download | rainbows-2b9503566759678c9fbd7b01d1b5f487854208db.tar.gz |
We do prereleases, now.
-rw-r--r-- | Rakefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 |