xcodegen 1.10.3 (new formula)
Closes #30079. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
8a8877c90f
commit
25bb13ce89
1 changed files with 37 additions and 0 deletions
37
Formula/xcodegen.rb
Normal file
37
Formula/xcodegen.rb
Normal file
|
@ -0,0 +1,37 @@
|
|||
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/1.10.3.tar.gz"
|
||||
sha256 "30944e90b9855ff893c6581e0d6dcdf7e8ab2c0c5edadacba7fb5ce27164975a"
|
||||
|
||||
depends_on :xcode => ["9.3", :build]
|
||||
|
||||
def install
|
||||
# fixes an issue an issue in homebrew when both Xcode 9.3+ and command line tools are installed
|
||||
# see more details here https://github.com/Homebrew/brew/pull/4147
|
||||
# remove this once homebrew is patched
|
||||
ENV["CC"] = Utils.popen_read("xcrun -find clang").chomp
|
||||
|
||||
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
|
Loading…
Reference in a new issue