gym 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gym/detect_values.rb +11 -0
- data/lib/gym/error_handler.rb +6 -6
- data/lib/gym/generators/package_command_generator_legacy.rb +0 -4
- data/lib/gym/generators/package_command_generator_xcode7.rb +1 -1
- data/lib/gym/options.rb +2 -1
- data/lib/gym/version.rb +1 -1
- data/lib/gym/xcodebuild_fixes/swift_fix.rb +31 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3aa13efb7f20e58904e222dec34cca8f65350f26
|
4
|
+
data.tar.gz: dc0ebdf3f6e4b276e04d7f5252becb1f6f59699b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3becf6c82b015683bead10ca50772cf28c840e9f4275953d5a397151544440634094665a12117ffebb7cebbd6d4c4e69f50deaee7280f31047617568b617e84
|
7
|
+
data.tar.gz: c2a00723dcf72bac88afd0dc29e234dc31c908371a64eee84e284c4a2a744463372b917d5523b34f0162fc612f6831c2349ac363969af651a14b258465e8dfa2
|
data/lib/gym/detect_values.rb
CHANGED
@@ -24,6 +24,7 @@ module Gym
|
|
24
24
|
detect_scheme
|
25
25
|
detect_platform # we can only do that *after* we have the scheme
|
26
26
|
detect_configuration
|
27
|
+
detect_toolchain
|
27
28
|
|
28
29
|
config[:output_name] ||= Gym.project.app_name
|
29
30
|
|
@@ -88,5 +89,15 @@ module Gym
|
|
88
89
|
end
|
89
90
|
end
|
90
91
|
end
|
92
|
+
|
93
|
+
# The toolchain parameter is used if you don't use the default toolchain of Xcode (e.g. Swift 2.3 with Xcode 8)
|
94
|
+
def self.detect_toolchain
|
95
|
+
return unless Gym.config[:toolchain]
|
96
|
+
|
97
|
+
# Convert the aliases to the full string to make it easier for the user #justfastlanethings
|
98
|
+
if Gym.config[:toolchain].to_s == "swift_2_3"
|
99
|
+
Gym.config[:toolchain] = "com.apple.dt.toolchain.Swift_2_3"
|
100
|
+
end
|
101
|
+
end
|
91
102
|
end
|
92
103
|
end
|
data/lib/gym/error_handler.rb
CHANGED
@@ -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://
|
15
|
+
print "Follow this guide: https://docs.fastlane.tools/codesigning/GettingStarted/"
|
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://
|
21
|
+
print "You can follow this guide: https://docs.fastlane.tools/codesigning/GettingStarted/"
|
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://
|
26
|
+
print "Follow this guide: https://docs.fastlane.tools/codesigning/GettingStarted/"
|
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://
|
31
|
+
print "Follow this guide: https://docs.fastlane.tools/codesigning/GettingStarted/"
|
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://
|
38
|
+
print "Follow this guide: https://docs.fastlane.tools/codesigning/GettingStarted/"
|
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://
|
102
|
+
print "Follow this guide to setup code signing https://docs.fastlane.tools/codesigning/GettingStarted/"
|
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
|
@@ -96,10 +96,6 @@ 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
|
103
99
|
end
|
104
100
|
end
|
105
101
|
end
|
@@ -168,7 +168,7 @@ module Gym
|
|
168
168
|
return if Gym.config[:provisioning_profile_path].to_s.length == 0
|
169
169
|
|
170
170
|
UI.error "You're using Xcode 7, the `provisioning_profile_path` value will be ignored"
|
171
|
-
UI.error "Please follow the Code Signing Guide: https://codesigning.guide (for match) or https://
|
171
|
+
UI.error "Please follow the Code Signing Guide: https://codesigning.guide (for match) or https://docs.fastlane.tools/codesigning/GettingStarted/"
|
172
172
|
end
|
173
173
|
end
|
174
174
|
end
|
data/lib/gym/options.rb
CHANGED
@@ -162,7 +162,8 @@ module Gym
|
|
162
162
|
FastlaneCore::ConfigItem.new(key: :toolchain,
|
163
163
|
env_name: "GYM_TOOLCHAIN",
|
164
164
|
description: "The toolchain that should be used for building the application (e.g. com.apple.dt.toolchain.Swift_2_3, org.swift.30p620160816a)",
|
165
|
-
optional: true
|
165
|
+
optional: true,
|
166
|
+
is_string: false),
|
166
167
|
FastlaneCore::ConfigItem.new(key: :provisioning_profile_path,
|
167
168
|
short_option: "-e",
|
168
169
|
env_name: "GYM_PROVISIONING_PROFILE_PATH",
|
data/lib/gym/version.rb
CHANGED
@@ -12,7 +12,7 @@ module Gym
|
|
12
12
|
def swift_library_fix
|
13
13
|
require 'fileutils'
|
14
14
|
|
15
|
-
return if check_for_swift
|
15
|
+
return if check_for_swift(PackageCommandGenerator)
|
16
16
|
|
17
17
|
UI.verbose "Packaging up the Swift Framework as the current app is a Swift app"
|
18
18
|
ipa_swift_frameworks = Dir["#{PackageCommandGenerator.appfile_path}/Frameworks/libswift*"]
|
@@ -27,14 +27,35 @@ module Gym
|
|
27
27
|
ipa_swift_frameworks.each do |path|
|
28
28
|
framework = File.basename(path)
|
29
29
|
|
30
|
-
|
30
|
+
begin
|
31
|
+
toolchain_dir = toolchain_dir_name_for_toolchain(Gym.config[:toolchain])
|
32
|
+
|
33
|
+
from = File.join(Xcode.xcode_path, "Toolchains/#{toolchain_dir}/usr/lib/swift/iphoneos/#{framework}")
|
34
|
+
to = File.join(swift_support, framework)
|
35
|
+
|
36
|
+
UI.verbose("Copying Swift framework from '#{from}'")
|
37
|
+
FileUtils.copy_file(from, to)
|
38
|
+
rescue => ex
|
39
|
+
UI.error("Error copying over framework file. Please try running gym without the legacy build API enabled")
|
40
|
+
UI.error("For more information visit https://github.com/fastlane/fastlane/issues/5863")
|
41
|
+
UI.error("Missing file #{path} inside #{Xcode.xcode_path}")
|
42
|
+
|
43
|
+
if Gym.config[:toolchain].nil?
|
44
|
+
UI.important("If you're using Swift 2.3, but already updated to Xcode 8")
|
45
|
+
UI.important("try adding the following parameter to your gym call:")
|
46
|
+
UI.success("gym(use_legacy_build_api: true, toolchain: :swift_2_3)")
|
47
|
+
UI.message("or")
|
48
|
+
UI.success("gym --use_legacy_build_api --toolchain swift_2_3")
|
49
|
+
end
|
50
|
+
|
51
|
+
UI.user_error!(ex)
|
52
|
+
end
|
31
53
|
end
|
32
54
|
|
33
55
|
# Add "SwiftSupport" to the .ipa archive
|
34
56
|
Dir.chdir(tmpdir) do
|
35
57
|
command_parts = ["zip --recurse-paths '#{PackageCommandGenerator.ipa_path}' SwiftSupport"]
|
36
58
|
command_parts << "> /dev/null" unless $verbose
|
37
|
-
Runner.new.print_command(command_parts, "Fix Swift embedded code if needed") if $verbose
|
38
59
|
|
39
60
|
FastlaneCore::CommandExecutor.execute(command: command_parts,
|
40
61
|
print_all: false,
|
@@ -46,6 +67,13 @@ module Gym
|
|
46
67
|
end
|
47
68
|
end
|
48
69
|
|
70
|
+
def toolchain_dir_name_for_toolchain(toolchain)
|
71
|
+
return "Swift_2.3.xctoolchain" if toolchain == "com.apple.dt.toolchain.Swift_2_3"
|
72
|
+
|
73
|
+
UI.error("No specific folder was found for toolchain #{toolchain}. Using the default toolchain location.") if toolchain
|
74
|
+
return "XcodeDefault.xctoolchain"
|
75
|
+
end
|
76
|
+
|
49
77
|
# @param the PackageCommandGenerator
|
50
78
|
# @return true if swift
|
51
79
|
def check_for_swift(pcg)
|
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.
|
4
|
+
version: 1.10.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-09-
|
11
|
+
date: 2016-09-22 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.
|
19
|
+
version: 0.52.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.
|
29
|
+
version: 0.52.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.
|
287
|
+
rubygems_version: 2.6.6
|
288
288
|
signing_key:
|
289
289
|
specification_version: 4
|
290
290
|
summary: Building your iOS apps has never been easier
|