homebrew-core/Formula/git-appraise.rb

34 lines
1.2 KiB
Ruby
Raw Normal View History

class GitAppraise < Formula
desc "Distributed code review system for Git repos"
homepage "https://github.com/google/git-appraise"
url "https://github.com/google/git-appraise/archive/v0.6.tar.gz"
sha256 "5c674ee7f022cbc36c5889053382dde80b8e80f76f6fac0ba0445ed5313a36f1"
head "https://github.com/google/git-appraise.git"
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/google").mkpath
ln_s buildpath, buildpath/"src/github.com/google/git-appraise"
system "go", "build", "-o", bin/"git-appraise", "github.com/google/git-appraise/git-appraise"
end
test do
system "git", "init"
system "git", "config", "user.email", "user@email.com"
(testpath/"README").write "test"
system "git", "add", "README"
system "git", "commit", "-m", "Init"
system "git", "branch", "user/test"
system "git", "checkout", "user/test"
(testpath/"README").append_lines "test2"
system "git", "add", "README"
system "git", "commit", "-m", "Update"
system "git", "appraise", "request", "--allow-uncommitted"
assert_predicate testpath/".git/refs/notes/devtools/reviews", :exist?
end
end