2016-01-25 13:50:32 +00:00
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Noti < Formula
|
|
|
|
desc "Displays a notification after a terminal process finishes."
|
|
|
|
homepage "https://github.com/variadico/noti"
|
2016-02-04 19:50:22 +00:00
|
|
|
url "https://github.com/variadico/noti/archive/v2.0.0.tar.gz"
|
|
|
|
sha256 "55c788afb4bafb63509f2b6c974e2afd7a6a97d06653ddca9ea1e92b507c5d7c"
|
2016-01-25 13:50:32 +00:00
|
|
|
head "https://github.com/variadico/noti.git", :branch => "dev"
|
|
|
|
|
2016-01-25 14:24:13 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2016-02-09 13:56:39 +00:00
|
|
|
sha256 "a2077219fba2537144a5d21793dcf683a0f6d2f7853dc4da4b26bf86251e699b" => :el_capitan
|
|
|
|
sha256 "9ed2ded9bc99cf7f57cd10a9492dac20bb9408f00925ed4e6c7266077a63d33b" => :yosemite
|
|
|
|
sha256 "86d478b13b5429106e923673b7bc010430eb160e9bc0375754b943b4c88ec5f9" => :mavericks
|
2016-01-25 14:24:13 +00:00
|
|
|
end
|
|
|
|
|
2016-01-25 13:50:32 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
mkdir_p "#{buildpath}/src/github.com/variadico"
|
|
|
|
ln_s buildpath, "#{buildpath}/src/github.com/variadico/noti"
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
cd "#{buildpath}/src/github.com/variadico/noti" do
|
|
|
|
if build.stable?
|
|
|
|
system "go", "build", "-o", "#{bin}/noti"
|
|
|
|
else
|
|
|
|
system "go", "build", "-o", "#{bin}/noti", "cmd/noti/main.go", "cmd/noti/osx.go"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/noti", "-t", "Noti", "-m", "'Noti recipe installation test has finished.'"
|
|
|
|
end
|
|
|
|
end
|