about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-07-22 16:44:05 +0000
committerEric Wong <normalperson@yhbt.net>2014-07-22 16:44:05 +0000
commit0186d557cdca1146fcdfd13a3f7cf0a1dca3b364 (patch)
tree98d1b802420dc96827044597e97ce152089f17e7
parent08d82638ff092e7c050c7b05ee5069aaa894c590 (diff)
downloadlibnodelay-0186d557cdca1146fcdfd13a3f7cf0a1dca3b364.tar.gz
remove update-freshmeat
The site is gone.
-rwxr-xr-xupdate-freshmeat.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/update-freshmeat.rb b/update-freshmeat.rb
deleted file mode 100755
index 9f9252e..0000000
--- a/update-freshmeat.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env ruby
-require "tempfile"
-require "net/http"
-require "net/netrc"
-require "json"
-version = ENV["VERSION"] or abort "VERSION= needed"
-uri = URI.parse("http://freshmeat.net/projects/libnodelay/releases.json")
-rc = Net::Netrc.locate("libnodelay-fm") or abort "~/.netrc 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) do |http|
-    p http.post(uri.path, req, {"Content-Type"=>"application/json"})
-  end
-else
-  warn "not updating freshmeat for v#{version}"
-end