Skip to content

Commit

Permalink
Add Homebrew support #3
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Nov 6, 2016
1 parent e0c9f98 commit 65f289b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions contrib/homebrew/protoc-gen-gotemplate.rb
@@ -0,0 +1,20 @@
require "language/go"

class ProtocGenGotemplate < Formula
desc "protocol generator + golang text/template (protobuf)"
homepage "https://github.com/moul/protoc-gen-gotemplate"
url "https://github.com/moul/protoc-gen-gotemplate/archive/v1.0.0.tar.gz"
sha256 "1ff57cd8513f1e871cf71dc8f2099bf64204af0df1b7397370827083e95bbb82"
head "https://github.com/moul/protoc-gen-gotemplate.git"

depends_on "go" => :build

def install
ENV["GOPATH"] = buildpath
ENV["GOBIN"] = buildpath
ENV["GO15VENDOREXPERIMENT"] = "1"
(buildpath/"src/github.com/moul/protoc-gen-gotemplate").install Dir["*"]

system "go", "build", "-o", "#{bin}/protoc-gen-gotemplate", "-v", "github.com/moul/protoc-gen-gotemplate"
end
end

0 comments on commit 65f289b

Please sign in to comment.