drone-cli 1.1.1 (new formula)

Closes #40837.

Signed-off-by: Izaak Beekman <zbeekman@gmail.com>
This commit is contained in:
Rui Chen 2019-06-09 22:16:00 -04:00 committed by Izaak Beekman
parent 74a0ea9c22
commit 1c1d4f83a7
No known key found for this signature in database
GPG key ID: A93CE70D8021BD0F

29
Formula/drone-cli.rb Normal file
View file

@ -0,0 +1,29 @@
class DroneCli < Formula
desc "Drone CLI"
homepage "https://drone.io"
url "https://github.com/drone/drone-cli.git",
:tag => "v1.1.1",
:revision => "b796291a8a07a0300696ee3944418236751788e1"
depends_on "dep" => :build
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
dir = buildpath/"src/github.com/drone/drone-cli"
dir.install buildpath.children
cd dir do
system "dep", "ensure", "-vendor-only"
system "go", "build", "-ldflags", "-X main.version=#{version}", "-o", bin/"drone", "drone/main.go"
prefix.install_metafiles
end
end
test do
assert_match version.to_s, shell_output("#{bin}/drone --version")
assert_match /manage logs/, shell_output("#{bin}/drone log 2>&1")
end
end