5dd775f364
Closes #23910. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
35 lines
1,004 B
Ruby
35 lines
1,004 B
Ruby
class Grv < Formula
|
|
desc "Terminal interface for viewing git repositories"
|
|
homepage "https://github.com/rgburke/grv"
|
|
url "https://github.com/rgburke/grv/releases/download/v0.1.2/grv-0.1.2-src.tar.gz"
|
|
sha256 "1f2f8adb28085fd892f4b23cf5cf17925fc502cf479be35193e1c6b93cad1e49"
|
|
head "https://github.com/rgburke/grv.git"
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "go" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "readline"
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
path = buildpath/"src/github.com/rgburke/grv"
|
|
path.install buildpath.children
|
|
|
|
cd path do
|
|
system "make", "build-only"
|
|
bin.install "grv"
|
|
prefix.install_metafiles
|
|
end
|
|
end
|
|
|
|
test do
|
|
ENV["TERM"] = "xterm"
|
|
|
|
system "git", "init"
|
|
system "git", "commit", "--allow-empty", "-m", "test"
|
|
pipe_output("#{bin}/grv -logLevel DEBUG", "'<grv-exit>'", 0)
|
|
|
|
assert_predicate testpath/"grv.log", :exist?
|
|
assert_match "Loaded HEAD", File.read(testpath/"grv.log")
|
|
end
|
|
end
|