mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
31 lines
976 B
Ruby
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.7.0.tar.gz"
|
|
sha256 "906691e949e2a16262d2dc8ee6bcf31e1fc78f748fd4b09a0ccef3568e17c684"
|
|
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
|