Files
XcodeGen/Formula/xcodegen.rb
T
2017-10-02 01:52:18 +02:00

31 lines
976 B
Ruby

class Xcodegen < Formula
desc "Tool that generates your Xcode project from a project spec"
homepage "https://github.com/yonaskolb/XcodeGen"
url "https://github.com/yonaskolb/XcodeGen/archive/1.2.4.tar.gz"
sha256 "4490df6f2e1442a0817f1a7e8e2eb34c1f173f2c92405870e62de1de87a6772d"
head "https://github.com/yonaskolb/XcodeGen.git"
depends_on :xcode
def install
system "make", "install", "PREFIX=#{prefix}"
end
test do
(testpath/"xcodegen.yml").write <<-EOS.undent
name: GeneratedProject
targets:
TestProject:
type: application
platform: iOS
sources: TestProject
settings:
PRODUCT_BUNDLE_IDENTIFIER: com.test
PRODUCT_NAME: TestProject
EOS
Dir.mkdir(File.join(testpath, "TestProject"))
system("#{bin}/XcodeGen --spec #{File.join(testpath, "xcodegen.yml")}")
system("xcodebuild --project #{File.join(testpath, "GeneratedProject.xcodeproj")}")
end
end