homebrew-core/Formula/sourcery.rb

32 lines
1.4 KiB
Ruby

class Sourcery < Formula
desc "Meta-programming for Swift, stop writing boilerplate code"
homepage "https://github.com/krzysztofzablocki/Sourcery"
url "https://github.com/krzysztofzablocki/Sourcery/archive/1.8.2.tar.gz"
sha256 "116a6ac617a6a58b36dc428f7989ea6a033d26a722f54c82abc7a778be6d52ea"
license "MIT"
head "https://github.com/krzysztofzablocki/Sourcery.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_monterey: "0b1bf2c761a91011e49d8f4f931114d94b41ebb452c96868c51148d7669196dc"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "8fae717d49cc6af56057ef970eab7b40016200493467519f63b4f05437dfeb36"
sha256 cellar: :any_skip_relocation, monterey: "6725c044f5259aadcca412185d8bcc6e2d6bb4cfb3c3f04978a14bf32adbfd28"
sha256 cellar: :any_skip_relocation, big_sur: "27f0bb3aa77c04122c28cd087e565f5b9189945b80a1cf6b87644fa0276e39f4"
end
depends_on :macos # Linux support is still a WIP: https://github.com/krzysztofzablocki/Sourcery/issues/306
depends_on xcode: "13.0"
uses_from_macos "ruby" => :build
def install
system "rake", "build"
bin.install "cli/bin/sourcery"
lib.install Dir["cli/lib/*.dylib"]
end
test do
# Regular functionality requires a non-sandboxed environment, so we can only test version/help here.
assert_match version.to_s, shell_output("#{bin}/sourcery --version").chomp
end
end