Skip to content

Commit

Permalink
Add homebrew support (fix #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Aug 28, 2016
1 parent a2fa89c commit 70d72ef
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions contrib/homebrew/number-to-words.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require "language/go"

class NumberToWords < Formula
desc "number-to-words: convert number into words"
homepage "https://github.com/moul/number-to-words"
url "https://github.com/moul/number-to-words/archive/v0.1.0.tar.gz"
sha256 "0d4aaf616f619daf0b4d17d281c19dadbebc2b3294a88783101b9e474cde9600"

head "https://github.com/moul/number-to-words.git"

depends_on "go" => :build

def install
ENV["GOPATH"] = buildpath
ENV["GOBIN"] = buildpath
(buildpath/"src/github.com/moul/number-to-words").install Dir["*"]

system "go", "build", "-o", "#{bin}/number-to-words", "-v", "github.com/moul/number-to-words/cmd/number-to-words/"
end
end

0 comments on commit 70d72ef

Please sign in to comment.