about summary refs log tree commit homepage
diff options
context:
space:
mode:
-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