Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add homebrew support (fix #6) #10

Merged
merged 1 commit into from
Oct 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions contrib/homebrew/anonuuid.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require "language/go"

class Anonuuid < Formula
desc "Anonymize streams"
homepage "https://github.com/moul/anonuuid"
url "https://github.com/moul/anonuuid/archive/v1.0.0.tar.gz"
sha256 "37d6ff3931276c7e8eac6d8d5c34d0deb1a649567dc2c4756fc4f74637a0eb51"

head "https://github.com/moul/anonuuid.git"

depends_on "go" => :build

def install
ENV["GOPATH"] = buildpath
ENV["CGO_ENABLED"] = "0"
ENV.prepend_create_path "PATH", buildpath/"bin"

mkdir_p buildpath/"src/github.com/moul"
ln_s buildpath, buildpath/"src/github.com/moul/anonuuid"
Language::Go.stage_deps resources, buildpath/"src"

system "go", "get", "github.com/codegangsta/cli"
system "go", "build", "-o", "anonuuid", "./cmd/anonuuid"
bin.install "anonuuid"

# FIXME: add autocompletion
end

test do
output = shell_output(bin/"anonuuid --version")
assert output.include? "anonuuid version"
end
end