lean-cli 0.2.0 (new formula)
Closes #4171. Signed-off-by: Tim D. Smith <git@tim-smith.us>
This commit is contained in:
parent
d05045032b
commit
4757148094
1 changed files with 23 additions and 0 deletions
23
Formula/lean-cli.rb
Normal file
23
Formula/lean-cli.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
class LeanCli < Formula
|
||||
desc "Command-line tool to develop and manage LeanCloud apps."
|
||||
homepage "https://github.com/leancloud/lean-cli"
|
||||
url "https://github.com/leancloud/lean-cli/archive/v0.2.0.tar.gz"
|
||||
sha256 "980980c764486aa933255fd64d391560e72bba78af8427253e1b4515ab6b68eb"
|
||||
head "https://github.com/leancloud/lean-cli.git"
|
||||
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
build_from = build.head? ? "homebrew-head" : "homebrew"
|
||||
ENV["GOPATH"] = buildpath
|
||||
mkdir_p buildpath/"src/github.com/leancloud/"
|
||||
ln_s buildpath, buildpath/"src/github.com/leancloud/lean-cli"
|
||||
system "go", "build", "-o", bin/"lean",
|
||||
"-ldflags", "-X main.pkgType=#{build_from}",
|
||||
"github.com/leancloud/lean-cli/lean"
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match "lean version #{version}", shell_output("#{bin}/lean --version")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue