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.0.3",
|
|
:revision => "85909e3373aa743c34a6a0ab59131f61fd9e8e43"
|
|
head "https://github.com/hashicorp/vault.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "86ed3fa4e12a3a6fef990157c1bc60264c79c1c0a39ffaf4c3eae82856f9ac32" => :mojave
|
|
sha256 "984e67cb1e2382b21b6c8174d3528b5612659e80793789a5c7c1ca4050cef4d7" => :high_sierra
|
|
sha256 "97695935d05af03528a09ee83e884c3f65d86192b4b3dda9a29d282ac1dfec14" => :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
|