drone-cli 1.1.1 (new formula)
Closes #40837. Signed-off-by: Izaak Beekman <zbeekman@gmail.com>
This commit is contained in:
parent
74a0ea9c22
commit
1c1d4f83a7
1 changed files with 29 additions and 0 deletions
29
Formula/drone-cli.rb
Normal file
29
Formula/drone-cli.rb
Normal 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
|
Loading…
Reference in a new issue