Module: Radius::Toolbelt::XcodeHelpers
- Defined in:
- lib/radius/toolbelt/xcode_helpers.rb
Class Method Summary collapse
Instance Method Summary collapse
- #agvtool(repo = ".") ⇒ Object
- #appledoc(name, framework, repo) ⇒ Object
- #compress(src, dest) ⇒ Object
- #schemes ⇒ Object
- #xcodebuild(args, pretty = true) ⇒ Object
Class Method Details
.included(klass) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/radius/toolbelt/xcode_helpers.rb', line 7 def self.included klass klass.class_eval do include ReleaseHelpers include SlackHelpers end end |
Instance Method Details
#agvtool(repo = ".") ⇒ Object
30 31 32 |
# File 'lib/radius/toolbelt/xcode_helpers.rb', line 30 def agvtool(repo = ".") `cd #{repo} && xcrun agvtool what-version -terse`.strip end |
#appledoc(name, framework, repo) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/radius/toolbelt/xcode_helpers.rb', line 35 def appledoc(name, framework, repo) sh " ./bin/appledoc \\\n --output \"build/\#{framework}Docs\" \\\n --create-html \\\n --no-create-docset \\\n --project-name \"\#{name}\" \\\n --project-company \"Radius Networks\" \\\n --project-version \#{agvtool repo} \\\n --company-id \"com.radiusnetworks.\#{framework}\" \\\n --exit-threshold 2 \\\n \"./build/\#{framework}.framework/Headers\"\n EOF\nend\n" |
#compress(src, dest) ⇒ Object
14 15 16 |
# File 'lib/radius/toolbelt/xcode_helpers.rb', line 14 def compress(src, dest) sh "ditto -ck --rsrc --sequesterRsrc --keepParent #{src} #{dest}" end |
#schemes ⇒ Object
25 26 27 28 |
# File 'lib/radius/toolbelt/xcode_helpers.rb', line 25 def schemes schemes = `xcodebuild -workspace Monsters.xcworkspace -list` schemes.each_line.map { |l| l.strip if l[/^ /]}.compact end |
#xcodebuild(args, pretty = true) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/radius/toolbelt/xcode_helpers.rb', line 18 def xcodebuild(args, pretty=true) output_dir = File.("./build") cmd = "xcodebuild #{args} UNIVERSAL_OUTPUT_DIR=#{output_dir} CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY='' #{ "| ./bin/xcpretty" if pretty }" puts cmd sh cmd end |