gym 1.7.0 → 1.8.0

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: 3cb5dfb0c034f1f176aa33c251efe825fc565588
4
- data.tar.gz: ad83beb96bae35108114fba5b82ceef5beb20582
3
+ metadata.gz: 590508ca78d6b207af7e7c309199a22a1d53064d
4
+ data.tar.gz: c98dd273ef0aea8914568bc655998415ee1fbe28
5
5
  SHA512:
6
- metadata.gz: 7b2ef7b42f1ac411b048ab1d31a31fdc224aa81d286bb19dab22c2775815863089010b02d52cc6d602f77de69aa95be1e5147b6a72ab57eb4f6bd60ccbc74549
7
- data.tar.gz: 8e9661c7de9d06cbfd85a752085ea01b31df8cad059d51de6b48bee97f5a466e726be94e1812821d032caf1b83f83f2d04ac31a09da6c0d4773e5e2d5c4b969e
6
+ metadata.gz: afb5c65b4055fe1f08bd5fef2263a15bad603d1cfda84fb69a0466f353f6d7144cd9d27d5e551937a8cc7c49cf636b41da60305d617998b282b7699a023fd4ba
7
+ data.tar.gz: 994c7872045e8af70d6d7b507e1ada9741e3c5a525dae10938bf297887299082a40365248b67fe8c55b08fbe8e283ebde0e63371d9e61822b356b692753f64f1
data/README.md CHANGED
@@ -53,7 +53,7 @@ Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.c
53
53
 
54
54
  # What's gym?
55
55
 
56
- `gym` builds and packages iOS and OS X apps for you. It takes care of all the heavy lifting and makes it super easy to generate a signed `ipa` or `app` file :muscle:
56
+ `gym` builds and packages iOS and macOS apps for you. It takes care of all the heavy lifting and makes it super easy to generate a signed `ipa` or `app` file :muscle:
57
57
 
58
58
  `gym` is a replacement for [shenzhen](https://github.com/nomad/shenzhen).
59
59
 
@@ -193,7 +193,7 @@ Using `fastlane` you can define a configuration like
193
193
 
194
194
  ```ruby
195
195
  lane :beta do
196
- xctool
196
+ scan
197
197
  gym(scheme: "MyApp")
198
198
  crashlytics
199
199
  end
data/lib/gym.rb CHANGED
@@ -43,6 +43,7 @@ module Gym
43
43
 
44
44
  Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
45
45
  UI = FastlaneCore::UI
46
+ ROOT = Pathname.new(File.expand_path('../..', __FILE__))
46
47
 
47
48
  Gym.init_libs
48
49
  end
@@ -50,7 +50,7 @@ module Gym
50
50
  containing = (File.directory?("fastlane") ? 'fastlane' : '.')
51
51
  path = File.join(containing, Gym.gymfile_name)
52
52
  UI.user_error! "Gymfile already exists" if File.exist?(path)
53
- template = File.read("#{Helper.gem_path('gym')}/lib/assets/GymfileTemplate")
53
+ template = File.read("#{Gym::ROOT}/lib/assets/GymfileTemplate")
54
54
  File.write(path, template)
55
55
  UI.success "Successfully created '#{path}'. Open the file using a code editor."
56
56
  end
@@ -56,11 +56,15 @@ module Gym
56
56
  Gym.project.select_scheme
57
57
  end
58
58
 
59
+ def self.min_xcode8?
60
+ Helper.xcode_version.split(".").first.to_i >= 8
61
+ end
62
+
59
63
  # Is it an iOS device or a Mac?
60
64
  def self.detect_platform
61
65
  return if Gym.config[:destination]
62
66
  platform = if Gym.project.mac?
63
- "OS X"
67
+ min_xcode8? ? "macOS" : "OS X"
64
68
  elsif Gym.project.tvos?
65
69
  "tvOS"
66
70
  else
@@ -12,30 +12,30 @@ module Gym
12
12
  print "Invalid code signing settings"
13
13
  print "Your project defines a provisioning profile which doesn't exist on your local machine"
14
14
  print "You can use sigh (https://github.com/fastlane/fastlane/tree/master/sigh) to download and install the provisioning profile"
15
- print "Follow this guide: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/CodeSigning.md"
15
+ print "Follow this guide: https://github.com/fastlane/fastlane/tree/master/fastlane/docs/Codesigning"
16
16
  when /Provisioning profile does not match bundle identifier/
17
17
  print "Invalid code signing settings"
18
18
  print "Your project defines a provisioning profile that doesn't match the bundle identifier of your app"
19
19
  print "Make sure you use the correct provisioning profile for this app"
20
20
  print "Take a look at the ouptput above for more information"
21
- print "You can follow this guide: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/CodeSigning.md"
21
+ print "You can follow this guide: https://github.com/fastlane/fastlane/tree/master/fastlane/docs/Codesigning"
22
22
  when /provisioning profiles matching the bundle identifier .(.*)./ # the . around the (.*) are for the strange "
23
23
  print "You don't have the provisioning profile for '#{$1}' installed on the local machine"
24
24
  print "Make sure you have the profile on this computer and it's properly installed"
25
25
  print "You can use sigh (https://github.com/fastlane/fastlane/tree/master/sigh) to download and install the provisioning profile"
26
- print "Follow this guide: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/CodeSigning.md"
26
+ print "Follow this guide: https://github.com/fastlane/fastlane/tree/master/fastlane/docs/Codesigning"
27
27
  when /matching the bundle identifier .(.*). were found/ # the . around the (.*) are for the strange "
28
28
  print "You don't have a provisioning profile for the bundle identifier '#{$1}' installed on the local machine"
29
29
  print "Make sure you have the profile on this computer and it's properly installed"
30
30
  print "You can use sigh (https://github.com/fastlane/fastlane/tree/master/sigh) to download and install the provisioning profile"
31
- print "Follow this guide: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/CodeSigning.md"
31
+ print "Follow this guide: https://github.com/fastlane/fastlane/tree/master/fastlane/docs/Codesigning"
32
32
 
33
33
  # Insert more code signing specific errors here
34
34
  when /code signing is required/
35
35
  print "Your project settings define invalid code signing settings"
36
36
  print "To generate an ipa file you need to enable code signing for your project"
37
37
  print "Additionally make sure you have a code signing identity set"
38
- print "Follow this guide: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/CodeSigning.md"
38
+ print "Follow this guide: https://github.com/fastlane/fastlane/tree/master/fastlane/docs/Codesigning"
39
39
  when /US\-ASCII/
40
40
  print "Your shell environment is not correctly configured"
41
41
  print "Instead of UTF-8 your shell uses US-ASCII"
@@ -99,7 +99,7 @@ module Gym
99
99
  print "Usually it's caused by the `Skip Install` option in Xcode, set it to `NO`"
100
100
  print "For more information visit https://developer.apple.com/library/ios/technotes/tn2215/_index.html"
101
101
  print "Also, make sure to have a valid code signing identity and provisioning profile installed"
102
- print "Follow this guide to setup code signing https://github.com/fastlane/fastlane/blob/master/fastlane/docs/CodeSigning.md"
102
+ print "Follow this guide to setup code signing https://github.com/fastlane/fastlane/tree/master/fastlane/docs/Codesigning"
103
103
  print "If your intention was only to export an ipa be sure to provide a valid archive at the archive path."
104
104
  UI.user_error!("Archive invalid")
105
105
  end
@@ -35,6 +35,7 @@ module Gym
35
35
  options += project_path_array
36
36
  options << "-configuration '#{config[:configuration]}'" if config[:configuration]
37
37
  options << "-sdk '#{config[:sdk]}'" if config[:sdk]
38
+ options << "-toolchain '#{config[:toolchain]}'" if config[:toolchain]
38
39
  options << "-destination '#{config[:destination]}'" if config[:destination]
39
40
  options << "-xcconfig '#{config[:xcconfig]}'" if config[:xcconfig]
40
41
  options << "-archivePath '#{archive_path}'"
@@ -63,8 +64,28 @@ module Gym
63
64
 
64
65
  def pipe
65
66
  pipe = []
66
- pipe << "| tee #{xcodebuild_log_path.shellescape} | xcpretty"
67
- pipe << "--no-color" if Helper.colors_disabled?
67
+ pipe << "| tee #{xcodebuild_log_path.shellescape}"
68
+ unless Gym.config[:disable_xcpretty]
69
+ formatter = Gym.config[:xcpretty_formatter]
70
+ pipe << "| xcpretty"
71
+ pipe << " --test" if Gym.config[:xcpretty_test_format]
72
+ pipe << " --no-color" if Helper.colors_disabled?
73
+ pipe << " --formatter " if formatter
74
+ pipe << formatter if formatter
75
+ report_output_junit = Gym.config[:xcpretty_report_junit]
76
+ report_output_html = Gym.config[:xcpretty_report_html]
77
+ report_output_json = Gym.config[:xcpretty_report_json]
78
+ if report_output_junit
79
+ pipe << " --report junit --output "
80
+ pipe << report_output_junit
81
+ elsif report_output_html
82
+ pipe << " --report html --output "
83
+ pipe << report_output_html
84
+ elsif report_output_json
85
+ pipe << " --report json-compilation-database --output "
86
+ pipe << report_output_json
87
+ end
88
+ end
68
89
  pipe << "> /dev/null" if Gym.config[:suppress_xcode_output]
69
90
 
70
91
  pipe
@@ -96,6 +96,10 @@ module Gym
96
96
  if Gym.config[:export_method].to_s.length > 0
97
97
  UI.important "Legacy build api is enabled, the `export_method` value will be ignored"
98
98
  end
99
+
100
+ if Gym.config[:toolchain].to_s.length > 0
101
+ UI.important "Legacy build api is enabled, the `toolchain` value will be ignored"
102
+ end
99
103
  end
100
104
  end
101
105
  end
@@ -28,6 +28,10 @@ module Gym
28
28
  options << "-archivePath '#{BuildCommandGenerator.archive_path}'"
29
29
  options << "-exportPath '#{temporary_output_path}'"
30
30
 
31
+ if Gym.config[:toolchain]
32
+ options << "-toolchain '#{Gym.config[:toolchain]}'"
33
+ end
34
+
31
35
  options
32
36
  end
33
37
 
@@ -164,7 +168,7 @@ module Gym
164
168
  return if Gym.config[:provisioning_profile_path].to_s.length == 0
165
169
 
166
170
  UI.error "You're using Xcode 7, the `provisioning_profile_path` value will be ignored"
167
- UI.error "Please follow the Code Signing Guide: https://codesigning.guide (for match) or https://github.com/fastlane/fastlane/blob/master/fastlane/docs/CodeSigning.md"
171
+ UI.error "Please follow the Code Signing Guide: https://codesigning.guide (for match) or https://github.com/fastlane/fastlane/tree/master/fastlane/docs/Codesigning"
168
172
  end
169
173
  end
170
174
  end
@@ -152,12 +152,16 @@ module Gym
152
152
  short_option: "-l",
153
153
  env_name: "GYM_BUILDLOG_PATH",
154
154
  description: "The directory where to store the build log",
155
- default_value: "~/Library/Logs/gym"),
155
+ default_value: "#{FastlaneCore::Helper.buildlog_path}/gym"),
156
156
  FastlaneCore::ConfigItem.new(key: :sdk,
157
157
  short_option: "-k",
158
158
  env_name: "GYM_SDK",
159
159
  description: "The SDK that should be used for building the application",
160
160
  optional: true),
161
+ FastlaneCore::ConfigItem.new(key: :toolchain,
162
+ env_name: "GYM_TOOLCHAIN",
163
+ description: "The toolchain that should be used for building the application (e.g. com.apple.dt.toolchain.Swift_2_3, org.swift.30p620160816a)",
164
+ optional: true),
161
165
  FastlaneCore::ConfigItem.new(key: :provisioning_profile_path,
162
166
  short_option: "-e",
163
167
  env_name: "GYM_PROVISIONING_PROFILE_PATH",
@@ -195,7 +199,45 @@ module Gym
195
199
  env_name: "SUPPRESS_OUTPUT",
196
200
  description: "Suppress the output of xcodebuild to stdout. Output is still saved in buildlog_path",
197
201
  optional: true,
198
- is_string: false)
202
+ is_string: false),
203
+ FastlaneCore::ConfigItem.new(key: :disable_xcpretty,
204
+ env_name: "DISABLE_XCPRETTY",
205
+ description: "Disable xcpretty formatting of build output",
206
+ optional: true,
207
+ is_string: false),
208
+ FastlaneCore::ConfigItem.new(key: :xcpretty_test_format,
209
+ env_name: "XCPRETTY_TEST_FORMAT",
210
+ description: "Use the test (RSpec style) format for build output",
211
+ optional: true,
212
+ is_string: false),
213
+ FastlaneCore::ConfigItem.new(key: :xcpretty_formatter,
214
+ env_name: "XCPRETTY_FORMATTER",
215
+ description: "A custom xcpretty formatter to use",
216
+ optional: true,
217
+ verify_block: proc do |value|
218
+ UI.user_error!("Formatter file not found at path '#{File.expand_path(value)}'") unless File.exist?(value)
219
+ end),
220
+ FastlaneCore::ConfigItem.new(key: :xcpretty_report_junit,
221
+ env_name: "XCPRETTY_REPORT_JUNIT",
222
+ description: "Have xcpretty create a JUnit-style XML report at the provided path",
223
+ optional: true,
224
+ verify_block: proc do |value|
225
+ UI.user_error!("Report output location not found at path '#{File.expand_path(value)}'") unless File.exist?(value)
226
+ end),
227
+ FastlaneCore::ConfigItem.new(key: :xcpretty_report_html,
228
+ env_name: "XCPRETTY_REPORT_HTML",
229
+ description: "Have xcpretty create a simple HTML report at the provided path",
230
+ optional: true,
231
+ verify_block: proc do |value|
232
+ UI.user_error!("Report output location not found at path '#{File.expand_path(value)}'") unless File.exist?(value)
233
+ end),
234
+ FastlaneCore::ConfigItem.new(key: :xcpretty_report_json,
235
+ env_name: "XCPRETTY_REPORT_JSON",
236
+ description: "Have xcpretty create a JSON compilation database at the provided path",
237
+ optional: true,
238
+ verify_block: proc do |value|
239
+ UI.user_error!("Report output location not found at path '#{File.expand_path(value)}'") unless File.exist?(value)
240
+ end)
199
241
  ]
200
242
  end
201
243
  end
@@ -1,4 +1,4 @@
1
1
  module Gym
2
- VERSION = "1.7.0"
2
+ VERSION = "1.8.0"
3
3
  DESCRIPTION = "Building your iOS apps has never been easier"
4
4
  end
@@ -14,7 +14,7 @@ module Gym
14
14
  # Check current set of PackageApplication MD5 hashes
15
15
  require 'digest'
16
16
 
17
- path = File.join(Helper.gem_path("gym"), "lib/assets/package_application_patches/PackageApplication_MD5")
17
+ path = File.join(Gym::ROOT, "lib/assets/package_application_patches/PackageApplication_MD5")
18
18
  expected_md5_hashes = File.read(path).split("\n")
19
19
 
20
20
  # If that location changes, search it using xcrun --sdk iphoneos -f PackageApplication
@@ -26,7 +26,7 @@ module Gym
26
26
  FileUtils.copy_file(package_application_path, @patched_package_application_path)
27
27
 
28
28
  # Apply patches to PackageApplication4Gym from patches folder
29
- Dir[File.join(Helper.gem_path("gym"), "lib/assets/package_application_patches/*.diff")].each do |patch|
29
+ Dir[File.join(Gym::ROOT, "lib/assets/package_application_patches/*.diff")].each do |patch|
30
30
  UI.verbose "Applying Package Application patch: #{File.basename(patch)}"
31
31
  command = ["patch '#{@patched_package_application_path}' < '#{patch}'"]
32
32
  Runner.new.print_command(command, "Applying Package Application patch: #{File.basename(patch)}") if $verbose
@@ -46,7 +46,7 @@ module Gym
46
46
  # Wrap xcodebuild to work-around ipatool dependecy to system ruby
47
47
  def wrap_xcodebuild
48
48
  require 'fileutils'
49
- @wrapped_xcodebuild_path ||= File.join(Helper.gem_path("gym"), "lib/assets/wrap_xcodebuild/xcbuild-safe.sh")
49
+ @wrapped_xcodebuild_path ||= File.join(Gym::ROOT, "lib/assets/wrap_xcodebuild/xcbuild-safe.sh")
50
50
  end
51
51
  end
52
52
  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: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-16 00:00:00.000000000 Z
11
+ date: 2016-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.43.3
19
+ version: 0.50.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.43.3
29
+ version: 0.50.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.0
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  version: '0'
285
285
  requirements: []
286
286
  rubyforge_project:
287
- rubygems_version: 2.5.1
287
+ rubygems_version: 2.2.2
288
288
  signing_key:
289
289
  specification_version: 4
290
290
  summary: Building your iOS apps has never been easier