# 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.2", :revision => "37a1dc9c477c1c68c022d2084550f25bf20cac33" head "https://github.com/hashicorp/vault.git" bottle do cellar :any_skip_relocation sha256 "f1f73bb67c1af2da00310a9de0e12f0e9adbfc0a582614c3ef72948c311f49e8" => :mojave sha256 "e8e205fa2982842b4caf53a10e1e6a28571c660ccc14343034b7581c76fd028f" => :high_sierra sha256 "1bf49b7e460415b976e05d629d08634a1f652e6a13a6108c3ac6254cf402f0cb" => :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