homebrew-core/Formula/frugal.rb
2020-01-17 08:23:49 -05:00

32 lines
1.1 KiB
Ruby

class Frugal < Formula
desc "Cross language code generator for creating scalable microservices"
homepage "https://github.com/Workiva/frugal"
url "https://github.com/Workiva/frugal/archive/v3.6.0.tar.gz"
sha256 "82181908b58e78d455618212539546ecb4c17315e05cf290812d6f270db66153"
bottle do
cellar :any_skip_relocation
sha256 "6469b19ad93fcb1cde96ba8f3718562ba879a4bf435c2365a8b7b1cb08739636" => :catalina
sha256 "adbd61619eea85ecb9c7629a895164599cc506b9e4038d6544063bca551e2299" => :mojave
sha256 "3e8b4e589835cbcb8b488761e41afbf00ec91c1a6d6d111dbe77f3de77ad3608" => :high_sierra
end
depends_on "glide" => :build
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/Workiva/frugal").install buildpath.children
cd "src/github.com/Workiva/frugal" do
system "glide", "install"
system "go", "build", "-o", bin/"frugal"
prefix.install_metafiles
end
end
test do
(testpath/"test.frugal").write("typedef double Test")
system "#{bin}/frugal", "--gen", "go", "test.frugal"
assert_match "type Test float64", (testpath/"gen-go/test/f_types.go").read
end
end