-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require "language/go" | ||
|
||
class GottyClient < Formula | ||
desc "gotty-client: GoTTY client for your terminal" | ||
homepage "https://github.com/moul/gotty-client" | ||
url "https://github.com/moul/gotty-client/archive/v1.0.1.tar.gz" | ||
sha256 "b74a2501218863b3853dc871f53dab1893357dfcd395be853c0f36b3d427928c" | ||
|
||
head "https://github.com/moul/gotty-client.git" | ||
|
||
depends_on "go" => :build | ||
|
||
def install | ||
ENV["GOPATH"] = buildpath | ||
ENV["CGO_ENABLED"] = "0" | ||
ENV.prepend_create_path "PATH", buildpath/"bin" | ||
|
||
mkdir_p buildpath/"src/github.com/moul" | ||
ln_s buildpath, buildpath/"src/github.com/moul/gotty-client" | ||
Language::Go.stage_deps resources, buildpath/"src" | ||
|
||
# FIXME: update version | ||
system "go", "build", "-o", "gotty-client", "./cmd/gotty-client/" | ||
bin.install "gotty-client" | ||
|
||
# FIXME: add autocompletion | ||
end | ||
|
||
test do | ||
# FIXME: add test | ||
#output = shell_output(bin/"gotty-client --version") | ||
#assert output.include? "gotty-client version XXX" | ||
end | ||
end |