about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-09-04 23:48:49 +0000
committerEric Wong <e@80x24.org>2014-09-05 01:36:10 +0000
commit69af3d363a06030466ceca9f7a13252eef0caa81 (patch)
tree6c230b8e938c633cf632f18bd94d9bf1ea9d5354
parent1b0b17910da9d3dea3d1f96083743545469db160 (diff)
downloadcmogstored-69af3d363a06030466ceca9f7a13252eef0caa81.tar.gz
The site is dead.
-rw-r--r--Rakefile38
1 files changed, 0 insertions, 38 deletions
diff --git a/Rakefile b/Rakefile
index 9e70ca4..ad08bda 100644
--- a/Rakefile
+++ b/Rakefile
@@ -104,41 +104,3 @@ task :distcheck_git do
     exit(1)
   end
 end
-
-desc "post to fm"
-task :fm_update do
-  require 'tempfile'
-  require 'net/http'
-  require 'net/netrc'
-  require 'json'
-  version = ENV['VERSION'] or abort "VERSION= needed"
-  uri = URI.parse('https://freecode.com/projects/cmogstored/releases.json')
-  rc = Net::Netrc.locate('cmogstored-fm') or
-    abort "~/.netrc or entry not found"
-  api_token = rc.password
-  _, subject, body = `git cat-file tag v#{version}`.split(/\n\n/, 3)
-  tmp = Tempfile.new('fm-changelog')
-  tmp.puts subject
-  tmp.puts
-  tmp.puts body
-  tmp.flush
-  system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
-  changelog = File.read(tmp.path).strip
-
-  req = {
-    "auth_code" => api_token,
-    "release" => {
-      "tag_list" => "stable",
-      "version" => version,
-      "changelog" => changelog,
-    },
-  }.to_json
-
-  if ! changelog.strip.empty? && version =~ %r{\A[\d\.]+\d+\z}
-    Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
-      p http.post(uri.path, req, {'Content-Type'=>'application/json'})
-    end
-  else
-    warn "not updating freshmeat for v#{version}"
-  end
-end