From d54cadba41eeabae3b976f001d2f50f478c06bb3 Mon Sep 17 00:00:00 2001 From: Ruihua Wen Date: Sat, 11 May 2024 11:19:13 +0900 Subject: [PATCH] chore: add new formula porter Signed-off-by: Ruihua Wen --- Formula/p/porter.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Formula/p/porter.rb diff --git a/Formula/p/porter.rb b/Formula/p/porter.rb new file mode 100644 index 00000000000000..0926d35447df48 --- /dev/null +++ b/Formula/p/porter.rb @@ -0,0 +1,24 @@ +class Porter < Formula + desc "Porter enables you to package your application artifact, client tools, configuration and deployment logic together as an installer that you can distribute, and install with a single command." + homepage "https://porter.sh" + url "https://github.com/SpiffyEight77/porter/archive/refs/tags/v1.0.17.1.tar.gz" + sha256 "2139036410612d28a455575066101aa9fcc0e231048d5b7b5c295ba207efd0ff" + license "Apache-2.0" + head "https://github.com/getporter/porter.git", branch: "main" + + depends_on "go" => :build + + def install + system "go", "run", "mage.go", "-v", "Build" + + bin.install "bin/porter" + + generate_completions_from_executable(bin/"porter", "completion") + end + + test do + assert_predicate bin/"porter", :exist?, "porter binary doesn't exist" + + assert_match "porter v1.0.17.1 (4157be0)", shell_output("#{bin}/porter version") + end +end