From 3bb78a7728492a750467f8fe514a696b9f3b7d85 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Tue, 17 Dec 2024 16:54:10 -0500 Subject: [PATCH] feat: Initial formula --- Formula/hpa.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Formula/hpa.rb diff --git a/Formula/hpa.rb b/Formula/hpa.rb new file mode 100644 index 0000000..f5f392a --- /dev/null +++ b/Formula/hpa.rb @@ -0,0 +1,26 @@ +class Hpa < Formula + desc "Command-line tool for managine home assesment projects" + homepage "https://git.housh.dev/michael/swift-hpa.git" + url "https://git.housh.dev/michael/swift-hpa/archive/v0.1.1.tar.gz" + sha256 "e6424672802fae056e423f3af77fda5a9c9bb5307ac2712ff8bfd072c1642a3b" + license "MIT" + + depends_on xcode: ["16.0", :build] + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release", "--product", "hpa" + bin.install ".build/release/hpa" + generate_completions_from_executable(bin/"hpa", "--generate-completion-script") + end + + test do + system "true" + end +end