Skip to content

Commit

Permalink
go-bindata 3.7.0 (new formula)
Browse files Browse the repository at this point in the history
Closes #24801.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information
ilovezfs committed Mar 3, 2018
1 parent 20ee7ff commit 4aa3404
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Formula/go-bindata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class GoBindata < Formula
desc "Small utility that generates Go code from any file"
homepage "https://github.com/kevinburke/go-bindata"
url "https://github.com/kevinburke/go-bindata/archive/v3.7.0.tar.gz"
sha256 "28553a1a1490465731484ac3326574f35c8528efc5ca7dcea428f8245f5c83b0"

depends_on "go"

def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/kevinburke").mkpath
ln_s buildpath, buildpath/"src/github.com/kevinburke/go-bindata"
system "go", "build", "-o", bin/"go-bindata", "./go-bindata"
end

test do
(testpath/"data").write "hello world"
system bin/"go-bindata", "-o", "data.go", "data"
assert_predicate testpath/"data.go", :exist?
assert_match '\xff\xff\x85\x11\x4a', (testpath/"data.go").read
end
end

0 comments on commit 4aa3404

Please sign in to comment.