Permalink
Browse files

[+] Added options to force the mobile provision to use

  • Loading branch information...
1 parent ca0489c commit ebb630cee290b1f2345e60e1be74c9f94e526572 Guillaume Cerquant committed Mar 28, 2012
Showing with 10 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +9 −1 xcodearchive.rb
View
@@ -0,0 +1 @@
+.DS_Store
View
@@ -30,7 +30,9 @@
# TODO
# Know bugs
+# - Running the shell commands with the backticks, we loose the stderr output
# - handle the case where the product name is different from target name
+
#
# New Features
# - generate a manifest plist file (equivalent of the checkbox "Save for Enterprise" in Xcode)
@@ -46,7 +48,7 @@
@version_number="1.0.2"
-XCODEBUILD="/Developer/usr/bin/xcodebuild"
+XCODEBUILD="/usr/bin/xcodebuild"
BZR="/usr/local/bin/bzr"
SVN="/usr/bin/svn"
PLISTBUDDY = "/usr/libexec/PlistBuddy"
@@ -106,6 +108,11 @@ def parse_options
opts.on( '-i', '--developper_identity DEVELOPPER_IDENTITY', 'Force the developper identity value' ) do |developper_identity|
@options[:developper_identity] = developper_identity
end
+
+ @options[:mobile_provision] = nil
+ opts.on( '-m', '--mobile_provision MOBILE_PROVISION_NAME', 'Force the mobile provision file to use' ) do |mobile_provision|
+ @options[:mobile_provision] = mobile_provision
+ end
@options[:project] = nil
@@ -247,6 +254,7 @@ def archive_xcode_project
puts "Using temporary path for build: #{path_of_temp_directory_where_to_build}" if verbose
build_command="#{XCODEBUILD} -project #{xcode_project_file_path()} SYMROOT=\"#{path_of_temp_directory_where_to_build}\""
+ build_command += " PROVISIONING_PROFILE=#{@options[:mobile_provision]}" if @options[:mobile_provision]
puts "Building:\n#{build_command}" if verbose
growl_alert("Building", "Building xCode project #{xcode_project_file_path}")

0 comments on commit ebb630c

Please sign in to comment.