Created
September 29, 2016 16:29
-
-
Save notjosh/78b567ff37dc52aa6559f70032d09714 to your computer and use it in GitHub Desktop.
Natalie 0.5 Homebrew formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/local/Library/Taps/homebrew/homebrew-core/Formula/natalie.rb | |
class Natalie < Formula | |
desc "Storyboard Code Generator (for Swift)" | |
homepage "https://github.com/krzyzanowskim/Natalie" | |
url "https://github.com/krzyzanowskim/Natalie/archive/0.5.0.tar.gz" | |
sha256 "66e00a4095121255a9740a16a8a59daa289f878f2e1e77ba6a9f98d6a671a33c" | |
head "https://github.com/krzyzanowskim/Natalie.git" | |
bottle do | |
cellar :any_skip_relocation | |
sha256 "a43680f8d24e3523ee7bc680dd570fddaeb4a208d9664f43219b35b918b0cb17" => :el_capitan | |
sha256 "49c77d43fca5c3e76dfc00d5d8c4465cb2e98772415a3372b747b9f73b3eeff6" => :yosemite | |
end | |
depends_on :xcode => "7.0" | |
def install | |
system "swift", "build", "-c", "release", "-Xswiftc", "-static-stdlib" | |
bin.install ".build/release/natalie" | |
share.install "NatalieExample" | |
end | |
test do | |
example_path = "#{share}/NatalieExample" | |
output_path = testpath/"Storyboards.swift" | |
generated_code = `#{bin}/natalie.swift #{example_path}` | |
output_path.write(generated_code) | |
line_count = `wc -l #{output_path}` | |
assert line_count.to_i > 1 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment