xcodebuilder 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30437bbbede67d9a78e2d9a1e7f02ccd7ec22fc8
4
- data.tar.gz: 56e36a21b97e20e992f3f2137da94d0ca282bc47
3
+ metadata.gz: 9889af066cb47eaf97ece6190a0c7f60b457a09a
4
+ data.tar.gz: 04a8141f18cacbb6b79df63e799c9d1c986355da
5
5
  SHA512:
6
- metadata.gz: ade62bd17c5fd54060debaa9b306479d582f5a3be45375d8f82245c77fa0c86ae5c308a7bfd8bb32ef412ae120fadad2c1b450d503a0e7b09a4c5acb8a0d9e5e
7
- data.tar.gz: 11680401964b1f172590f2f8f62921676b20b071dae020726aef8e6bdf4f6cb1e7d2013c9ecb4f6485d38c8420bb501de3593497325be38fdfb7eff4dbd5ceb8
6
+ metadata.gz: 924a2a36d141a6d0974e1b89d56741d40f55e9e8cacb7d8ed8779ae224f8f3a65cb09727e5c0dac24309ae063e4226d95f9cd9cd2bbc773185d271011031d9e5
7
+ data.tar.gz: 1735750f5827d76ed908deb92bd841eb09c7dc1a965911620c9fb2a2ac8e92eafca444a108ca39d857ca7b07ef7fc1ee587e37fbde59c4cc21bd48b743384c25
data/lib/xcode_builder.rb CHANGED
@@ -28,8 +28,7 @@ module XcodeBuilder
28
28
  :xcodebuild_extra_args => nil,
29
29
  :xcrun_extra_args => nil,
30
30
  :timestamp_build => nil,
31
- :pod_repo_sources => nil,
32
- :watch_app => false
31
+ :pod_repo_sources => nil
33
32
  )
34
33
  @namespace = namespace
35
34
  yield @configuration if block_given?
@@ -72,7 +71,7 @@ module XcodeBuilder
72
71
  @configuration.timestamp_plist if @configuration.timestamp_build
73
72
 
74
73
  print "Building Project..."
75
- success = xcodebuild @configuration.build_arguments, "archive"
74
+ success = xcodebuild @configuration.build_arguments, "build"
76
75
  raise "** BUILD FAILED **" unless success
77
76
  puts "Done"
78
77
  end
@@ -81,29 +80,41 @@ module XcodeBuilder
81
80
  def package
82
81
  build
83
82
 
84
- puts "Packaging and Signing..."
83
+ print "Packaging and Signing..."
84
+ if (@configuration.signing_identity != nil) then
85
+ puts ""
86
+ print "Signing identity: #{@configuration.signing_identity}"
87
+ end
88
+
85
89
  # trash and create the dist IPA path if needed
86
90
  FileUtils.rm_rf @configuration.package_destination_path unless !File.exists? @configuration.package_destination_path
87
91
  FileUtils.mkdir_p @configuration.package_destination_path
88
92
 
89
93
  # Construct the IPA and Sign it
90
94
  cmd = []
91
- cmd << "-exportArchive"
92
- cmd << "-exportFormat"
93
- cmd << "ipa"
94
- cmd << "-exportWithOriginalSigningIdentity"
95
- cmd << "-archivePath"
96
- cmd << "'#{File.expand_path @configuration.xcarchive_path}'"
97
- cmd << "-exportPath"
98
- cmd << "'#{File.expand_path @configuration.ipa_path}'"
99
-
100
- xcodebuild cmd, ""
101
- puts "Done."
95
+ cmd << "/usr/bin/xcrun"
96
+ cmd << "-sdk iphoneos"
97
+ cmd << "PackageApplication"
98
+ cmd << "'#{@configuration.built_app_path}'"
99
+ cmd << "-o '#{@configuration.ipa_path}'"
100
+ cmd << "--sign '#{@configuration.signing_identity}'" unless @configuration.signing_identity == nil
101
+
102
+ if @configuration.xcrun_extra_args then
103
+ cmd.concat @configuration.xcrun_extra_args if @configuration.xcrun_extra_args.is_a? Array
104
+ cmd << @configuration.xcrun_extra_args if @configuration.xcrun_extra_args.is_a? String
105
+ end
102
106
 
107
+ puts "Running #{cmd.join(" ")}" if @configuration.verbose
108
+ cmd << "2>&1 /dev/null"
109
+ cmd = cmd.join(" ")
110
+ system(cmd)
111
+
103
112
  if @configuration.watch_app then
104
113
  reinject_wk_stub_in_ipa
105
114
  end
106
-
115
+
116
+ puts ""
117
+ puts "Done."
107
118
  end
108
119
 
109
120
  def reinject_wk_stub_in_ipa
@@ -141,6 +152,7 @@ module XcodeBuilder
141
152
  puts ""
142
153
  end
143
154
 
155
+
144
156
  def deploy
145
157
  package
146
158
  @configuration.deployment_strategy.deploy
@@ -22,8 +22,6 @@ module XcodeBuilder
22
22
  end
23
23
 
24
24
  args << "-sdk iphoneos"
25
-
26
- args << "-archivePath #{File.expand_path xcarchive_path}"
27
25
 
28
26
  args << "-configuration '#{configuration}'"
29
27
  args << "BUILD_DIR=\"#{File.expand_path build_dir}\""
@@ -137,10 +135,6 @@ module XcodeBuilder
137
135
  File.join("#{build_dir}", "#{configuration}-iphoneos", "#{app_file_name}")
138
136
  end
139
137
 
140
- def xcarchive_path
141
- File.join("#{build_dir}", "#{configuration}.xcarchive")
142
- end
143
-
144
138
  def ipa_path
145
139
  File.join(File.expand_path(package_destination_path), ipa_name)
146
140
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcodebuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Larivain