37 lines
1.4 KiB
Ruby
37 lines
1.4 KiB
Ruby
class Immortal < Formula
|
|
desc "OS agnostic (*nix) cross-platform supervisor"
|
|
homepage "https://immortal.run/"
|
|
url "https://github.com/immortal/immortal/archive/0.22.0.tar.gz"
|
|
sha256 "2e5886b49155dc77dd532e157ff1470fb1fb17414a42f2f1addebae3d29063f7"
|
|
head "https://github.com/immortal/immortal.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "07d9d90f193320f849749a3dac873ff270d097264096ac7219dd5a3d7cf6357f" => :mojave
|
|
sha256 "b63e3bcdfd7f667198c9318861694871b58394d1b5ee4e128b6f0a73ad60474d" => :high_sierra
|
|
sha256 "81d6d822e3c74eb1e24c09855328d6bdb9f9be1de11c4fe8a9e23d92b6d398e5" => :sierra
|
|
end
|
|
|
|
depends_on "dep" => :build
|
|
depends_on "go" => :build
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
(buildpath/"src/github.com/immortal/immortal").install buildpath.children
|
|
cd "src/github.com/immortal/immortal" do
|
|
system "dep", "ensure", "-vendor-only"
|
|
ldflags = "-s -w -X main.version=#{version}"
|
|
system "go", "build", "-ldflags", ldflags, "-o", "#{bin}/immortal", "cmd/immortal/main.go"
|
|
system "go", "build", "-ldflags", ldflags, "-o", "#{bin}/immortalctl", "cmd/immortalctl/main.go"
|
|
system "go", "build", "-ldflags", ldflags, "-o", "#{bin}/immortaldir", "cmd/immortaldir/main.go"
|
|
man8.install Dir["man/*.8"]
|
|
prefix.install_metafiles
|
|
end
|
|
end
|
|
|
|
test do
|
|
system bin/"immortal", "-v"
|
|
system bin/"immortalctl", "-v"
|
|
system bin/"immortaldir", "-v"
|
|
end
|
|
end
|