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