39 lines
1.3 KiB
Ruby
39 lines
1.3 KiB
Ruby
class Xcodegen < Formula
|
|
desc "Generate your Xcode project from a spec file and your folder structure"
|
|
homepage "https://github.com/yonaskolb/XcodeGen"
|
|
url "https://github.com/yonaskolb/XcodeGen/archive/2.9.0.tar.gz"
|
|
sha256 "d0eee7726fb702ea9f8d64f4bbb02837c5179ecbbb6c0cfd91f0db0c6b874ee3"
|
|
head "https://github.com/yonaskolb/XcodeGen.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "55ec975a95f01d502b35acc17bc211dc0ab5ae5c0ee51a80bd2012b6c44a5ff5" => :catalina
|
|
sha256 "70508f66a4f833c2f8dc63edf17718e584979d666cb98358497e793d96a69792" => :mojave
|
|
end
|
|
|
|
depends_on :xcode => ["10.2", :build]
|
|
|
|
def install
|
|
system "make", "install", "PREFIX=#{prefix}"
|
|
end
|
|
|
|
test do
|
|
(testpath/"xcodegen.yml").write <<~EOS
|
|
name: GeneratedProject
|
|
options:
|
|
bundleIdPrefix: com.project
|
|
targets:
|
|
TestProject:
|
|
type: application
|
|
platform: iOS
|
|
sources: TestProject
|
|
EOS
|
|
(testpath/"TestProject").mkpath
|
|
system bin/"XcodeGen", "--spec", testpath/"xcodegen.yml"
|
|
assert_predicate testpath/"GeneratedProject.xcodeproj", :exist?
|
|
assert_predicate testpath/"GeneratedProject.xcodeproj/project.pbxproj", :exist?
|
|
output = (testpath/"GeneratedProject.xcodeproj/project.pbxproj").read
|
|
assert_match "name = TestProject", output
|
|
assert_match "isa = PBXNativeTarget", output
|
|
end
|
|
end
|