From 6553115d389d7907bea9167f1f94587664904f66 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 30 Sep 2022 18:41:50 -0400 Subject: [PATCH] steampipe 0.17.4 (new formula) * steampipe 0.17.4 (new formula) * steampipe: update test * steampipe: update test Closes #118928. Signed-off-by: Rui Chen Signed-off-by: Patrick Linnane Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/steampipe.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Formula/steampipe.rb diff --git a/Formula/steampipe.rb b/Formula/steampipe.rb new file mode 100644 index 00000000000..0200ff3202e --- /dev/null +++ b/Formula/steampipe.rb @@ -0,0 +1,26 @@ +class Steampipe < Formula + desc "Use SQL to instantly query your cloud services" + homepage "https://steampipe.io/" + url "https://github.com/turbot/steampipe/archive/refs/tags/v0.17.4.tar.gz" + sha256 "e754c17b1acbdd17104591b9bdd72433f8bc22d3918c465a734543c19245c5fe" + license "AGPL-3.0-only" + head "https://github.com/turbot/steampipe.git", branch: "main" + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"steampipe", "completion") + end + + test do + output = shell_output(bin/"steampipe service status 2>&1") + if OS.mac? + assert_match "Error: could not create installation directory", output + else # Linux + assert_match "Steampipe service is not installed", output + end + assert_match "steampipe version #{version}", shell_output(bin/"steampipe --version") + end +end