gym 0.7.0 → 0.7.1

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: 46d8c23f191b23c471b3e47c7531499520841f42
4
- data.tar.gz: f0808090ccacdd0b189c85dd999317d0a1b20994
3
+ metadata.gz: 63bdd2db07c2f8fae8b2242da7fcbfb30699f07d
4
+ data.tar.gz: 467a75673b7601adeaf29dc30cefaefb8201d8c1
5
5
  SHA512:
6
- metadata.gz: 6f9b52fabdb2186ea70c896961ecdc8cca91a12c6cc0d906e60cc21da4f4f10c959f7a12de14f762212aa2b4cb6335ed80a4bb15503d33b51923cfd1d3302601
7
- data.tar.gz: 58a99d14c47ff55ec0e38276edf3e0727835ced06221aae522ef2a147af91c15e62e144757a0d23595981916ff74f6a050d95de651fb52bb2d23c39d87024a41
6
+ metadata.gz: 9b6ddb4de656331d37e53445f19a06ed372560746e898908405d8a6eed083f879a43ac1d8b10f4ded8fdc176a094ee96b261388d8a6980731e13430692a9c26e
7
+ data.tar.gz: 5ff570a4bea8e9f3c0d8135589111470c024c334756c56b00c08e40a62fd9d51612057d8f58718afcf3fd1587cbb935d55cd618a766be29b35dbc039dfaa9e28
data/README.md CHANGED
@@ -190,9 +190,25 @@ xcodebuild -scheme 'Example' \
190
190
  archive | xcpretty
191
191
  ```
192
192
 
193
-
194
193
  After building the archive it is being checked by `gym`. If it's valid, it gets packaged up and signed into an `ipa` file.
195
194
 
195
+ `gym` automatically chooses a different packaging method depending on the version of Xcode you're using.
196
+
197
+ ### Xcode 7 and above
198
+
199
+ ```
200
+ /usr/bin/xcrun xcodebuild -exportArchive \
201
+ -exportOptionsPlist '/tmp/gym_config_1442852529.plist' \
202
+ -archivePath '/Users/fkrause/Library/Developer/Xcode/Archives/2015-09-21/App 2015-09-21 09.21.56.xcarchive' \
203
+ -exportPath '/tmp/1442852529'
204
+ ```
205
+
206
+ `gym` makes use of the new Xcode 7 API which allows us to specify the export options using a `plist` file. You can find more information about the available options by running `xcodebuild --help`.
207
+
208
+ Using this method there are no workarounds for WatchKit or Swift required, as it uses the same technique Xcode uses when exporting your binary.
209
+
210
+ ### Xcode 6 and below
211
+
196
212
  ```
197
213
  /usr/bin/xcrun /path/to/PackageApplication4Gym -v \
198
214
  '/Users/felixkrause/Library/Developer/Xcode/Archives/2015-08-11/ExampleProductName 2015-08-11 18.15.30.xcarchive/Products/Applications/name.app' -o \
@@ -80,6 +80,10 @@ module Gym
80
80
  when /Codesign check fails/
81
81
  print "A general code signing error occurred. Make sure you passed a valid"
82
82
  print "provisioning profile and code signing identity."
83
+ when /expected one of \{\}/
84
+ print "It seems like you ran into this radar"
85
+ print "https://openradar.appspot.com/radar?id=4952000420642816"
86
+ print "You can temporary use the :use_legacy_build_api option to get the build to work again"
83
87
  end
84
88
  raise "Error packaging up the application".red
85
89
  end
@@ -28,7 +28,11 @@ module Gym
28
28
 
29
29
  # The generator we need to use for the currently used Xcode version
30
30
  def generator
31
- Xcode.pre_7? ? PackageCommandGeneratorLegacy : PackageCommandGeneratorXcode7
31
+ if Xcode.pre_7? and !Gym.config[:use_legacy_build_api]
32
+ PackageCommandGeneratorLegacy
33
+ else
34
+ PackageCommandGeneratorXcode7
35
+ end
32
36
  end
33
37
  end
34
38
  end
data/lib/gym/options.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "fastlane_core"
2
2
  require "credentials_manager"
3
3
 
4
+ # rubocop:disable Metrics/AbcSize
4
5
  module Gym
5
6
  class Options
6
7
  def self.available_options
@@ -113,6 +114,16 @@ module Gym
113
114
  description: "Should the ipa include bitcode?",
114
115
  default_value: false,
115
116
  is_string: false),
117
+ FastlaneCore::ConfigItem.new(key: :use_legacy_build_api,
118
+ env_name: "GYM_USE_LEGACY_BUILD_API",
119
+ description: "Don't use the new API because of https://openradar.appspot.com/radar?id=4952000420642816",
120
+ default_value: false,
121
+ is_string: false,
122
+ verify_block: proc do |value|
123
+ if value
124
+ Helper.log.info "Using legacy build system - waiting for radar to be fixed: https://openradar.appspot.com/radar?id=4952000420642816".red
125
+ end
126
+ end),
116
127
  FastlaneCore::ConfigItem.new(key: :export_method,
117
128
  short_option: "-j",
118
129
  env_name: "GYM_EXPORT_METHOD",
@@ -136,3 +147,4 @@ module Gym
136
147
  end
137
148
  end
138
149
  end
150
+ # rubocop:enable Metrics/AbcSize
data/lib/gym/runner.rb CHANGED
@@ -67,7 +67,6 @@ module Gym
67
67
  return unless Xcode.pre_7?
68
68
  Gym::XcodebuildFixes.swift_library_fix
69
69
  Gym::XcodebuildFixes.watchkit_fix
70
- Gym::XcodebuildFixes.clear_patched_package_application
71
70
  end
72
71
 
73
72
  # Builds the app and prepares the archive
data/lib/gym/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Gym
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  DESCRIPTION = "Building your iOS apps has never been easier"
4
4
  end
@@ -7,8 +7,8 @@ module Gym
7
7
 
8
8
  # Initialization
9
9
  @patched_package_application_path = File.join("/tmp", "PackageApplication4Gym")
10
- # Remove any previous patched PackageApplication
11
- FileUtils.rm @patched_package_application_path if File.exist?(@patched_package_application_path)
10
+
11
+ return @patched_package_application_path if File.exist?(@patched_package_application_path)
12
12
 
13
13
  Dir.mktmpdir do |tmpdir|
14
14
  # Check current PackageApplication MD5
@@ -42,15 +42,6 @@ module Gym
42
42
 
43
43
  return @patched_package_application_path # Return path to the patched PackageApplication
44
44
  end
45
-
46
- # Remove the patched script after it was used
47
- def clear_patched_package_application
48
- if @patched_package_application_path and File.exist?(@patched_package_application_path)
49
- Helper.log.debug "Removing patched PackageApplication file at path '#{@patched_package_application_path}'" if $verbose
50
- # force in the unlikely event that the file was deleted (e.g. by a concurrent job)
51
- FileUtils.rm @patched_package_application_path, force: true
52
- end
53
- end
54
45
  end
55
46
  end
56
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gym
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-20 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  version: '0'
269
269
  requirements: []
270
270
  rubyforge_project:
271
- rubygems_version: 2.4.6
271
+ rubygems_version: 2.4.5
272
272
  signing_key:
273
273
  specification_version: 4
274
274
  summary: Building your iOS apps has never been easier