44 lines
1.4 KiB
Ruby
44 lines
1.4 KiB
Ruby
# Please don't update this formula until the release is official via
|
|
# mailing list or blog post. There's a history of GitHub tags moving around.
|
|
# https://github.com/hashicorp/vault/issues/1051
|
|
class Vault < Formula
|
|
desc "Secures, stores, and tightly controls access to secrets"
|
|
homepage "https://vaultproject.io/"
|
|
url "https://github.com/hashicorp/vault.git",
|
|
:tag => "v1.1.2",
|
|
:revision => "0082501623c0b704b87b1fbc84c2d725994bac54"
|
|
head "https://github.com/hashicorp/vault.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "0af2c522d50ce18f7790326e53119dcafb032b004ef5ebc82e6dbefb599aaf1b" => :mojave
|
|
sha256 "330a2b27e434f093446e8ffca26566e71e28f73a5a705108808f604bf91c2eee" => :high_sierra
|
|
sha256 "97a509a2581c162cf2281e5be3507256c0508d36a2639cc1cfa677b3ed51e87b" => :sierra
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "gox" => :build
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
contents = buildpath.children - [buildpath/".brew_home"]
|
|
(buildpath/"src/github.com/hashicorp/vault").install contents
|
|
|
|
(buildpath/"bin").mkpath
|
|
|
|
cd "src/github.com/hashicorp/vault" do
|
|
system "make", "dev"
|
|
bin.install "bin/vault"
|
|
prefix.install_metafiles
|
|
end
|
|
end
|
|
|
|
test do
|
|
pid = fork { exec bin/"vault", "server", "-dev" }
|
|
sleep 1
|
|
ENV.append "VAULT_ADDR", "http://127.0.0.1:8200"
|
|
system bin/"vault", "status"
|
|
Process.kill("TERM", pid)
|
|
end
|
|
end
|