homebrew-core/Formula/antibody.rb

29 lines
802 B
Ruby
Raw Normal View History

class Antibody < Formula
desc "The fastest shell plugin manager"
homepage "https://getantibody.github.io/"
url "https://github.com/getantibody/antibody/archive/v4.1.2.tar.gz"
sha256 "79e857c79cf51bff0bf42ef970a31341445911dc19cf24efb8faa01584855905"
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
ENV["GO111MODULE"] = "on"
dir = buildpath/"src/github.com/antibody/antibody"
dir.install buildpath.children
cd dir do
system "go", "mod", "vendor"
system "go", "build", "-ldflags", "-X main.version=#{version}"
bin.install "antibody"
end
end
test do
# See if antibody can install a bundle correctly
system "#{bin}/antibody", "bundle", "rupa/z"
assert_match("rupa/z", shell_output("#{bin}/antibody list"))
end
end