fastlane 1.17.1 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/actions/actions_helper.rb +1 -1
- data/lib/fastlane/actions/get_build_number.rb +85 -0
- data/lib/fastlane/actions/get_version_number.rb +85 -0
- data/lib/fastlane/actions/{install_cocapods.rb → install_cocoapods.rb} +0 -0
- data/lib/fastlane/actions/ipa.rb +7 -6
- data/lib/fastlane/actions/xcodebuild.rb +22 -1
- data/lib/fastlane/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 113e596cd87aeba33d9bc3db0b6864c94de0ca20
|
4
|
+
data.tar.gz: 8746dd48df41803c9e868099211af4c8fedddd90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04b070d6da9487c6633e7af1706b3fa455346ec9409bfe665735b8964a54da2c12d8ed5795bb7429c2f30411c82472833d75b18be9ce2940efb7e780b11a848a
|
7
|
+
data.tar.gz: f4d5c2f7c92370e2351b8dc143682db08674b429a018ebce64378210983ff1e7d05c1542dcca7af018906fca572af84c35870b15b18e7b9b79f35ee3617969ec
|
@@ -0,0 +1,85 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class GetBuildNumberAction < Action
|
4
|
+
require 'shellwords'
|
5
|
+
|
6
|
+
def self.run(params)
|
7
|
+
# More information about how to set up your project and how it works:
|
8
|
+
# https://developer.apple.com/library/ios/qa/qa1827/_index.html
|
9
|
+
|
10
|
+
begin
|
11
|
+
folder = params[:xcodeproj] ? File.join('.', params[:xcodeproj], '..') : '.'
|
12
|
+
|
13
|
+
command_prefix = [
|
14
|
+
'cd',
|
15
|
+
File.expand_path(folder).shellescape,
|
16
|
+
'&&'
|
17
|
+
].join(' ')
|
18
|
+
|
19
|
+
command = [
|
20
|
+
command_prefix,
|
21
|
+
'agvtool',
|
22
|
+
'what-version',
|
23
|
+
'-terse'
|
24
|
+
].join(' ')
|
25
|
+
|
26
|
+
if Helper.test?
|
27
|
+
Actions.lane_context[SharedValues::BUILD_NUMBER] = command
|
28
|
+
else
|
29
|
+
|
30
|
+
build_number = (Actions.sh command).split("\n").last.to_i
|
31
|
+
|
32
|
+
# Store the number in the shared hash
|
33
|
+
Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number
|
34
|
+
end
|
35
|
+
rescue => ex
|
36
|
+
Helper.log.error 'Make sure to to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html'.yellow
|
37
|
+
raise ex
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
#####################################################
|
42
|
+
# @!group Documentation
|
43
|
+
#####################################################
|
44
|
+
|
45
|
+
def self.description
|
46
|
+
"Get the build number of your project"
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.details
|
50
|
+
[
|
51
|
+
"This action will return the current build number set on your project.",
|
52
|
+
"You first have to set up your Xcode project, if you haven't done it already:",
|
53
|
+
"https://developer.apple.com/library/ios/qa/qa1827/_index.html"
|
54
|
+
].join(' ')
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.available_options
|
58
|
+
[
|
59
|
+
FastlaneCore::ConfigItem.new(key: :xcodeproj,
|
60
|
+
env_name: "FL_BUILD_NUMBER_PROJECT",
|
61
|
+
description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
|
62
|
+
optional: true,
|
63
|
+
verify_block: Proc.new do |value|
|
64
|
+
raise "Please pass the path to the project, not the workspace".red if value.include?"workspace"
|
65
|
+
raise "Could not find Xcode project".red if (not File.exists?(value) and not Helper.is_test?)
|
66
|
+
end)
|
67
|
+
]
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.output
|
71
|
+
[
|
72
|
+
['BUILD_NUMBER', 'The build number']
|
73
|
+
]
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.authors
|
77
|
+
["Liquidsoul"]
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.is_supported?(platform)
|
81
|
+
[:ios, :mac].include?platform
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class GetVersionNumberAction < Action
|
4
|
+
require 'shellwords'
|
5
|
+
|
6
|
+
def self.run(params)
|
7
|
+
# More information about how to set up your project and how it works:
|
8
|
+
# https://developer.apple.com/library/ios/qa/qa1827/_index.html
|
9
|
+
|
10
|
+
begin
|
11
|
+
folder = params[:xcodeproj] ? File.join('.', params[:xcodeproj], '..') : '.'
|
12
|
+
|
13
|
+
command_prefix = [
|
14
|
+
'cd',
|
15
|
+
File.expand_path(folder).shellescape,
|
16
|
+
'&&'
|
17
|
+
].join(' ')
|
18
|
+
|
19
|
+
command = [
|
20
|
+
command_prefix,
|
21
|
+
'agvtool',
|
22
|
+
'what-marketing-version',
|
23
|
+
'-terse1'
|
24
|
+
].join(' ')
|
25
|
+
|
26
|
+
if Helper.test?
|
27
|
+
Actions.lane_context[SharedValues::VERSION_NUMBER] = command
|
28
|
+
else
|
29
|
+
|
30
|
+
version_number = (Actions.sh command).split("\n").last
|
31
|
+
|
32
|
+
# Store the number in the shared hash
|
33
|
+
Actions.lane_context[SharedValues::VERSION_NUMBER] = version_number
|
34
|
+
end
|
35
|
+
rescue => ex
|
36
|
+
Helper.log.error 'Make sure to to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html'.yellow
|
37
|
+
raise ex
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
#####################################################
|
42
|
+
# @!group Documentation
|
43
|
+
#####################################################
|
44
|
+
|
45
|
+
def self.description
|
46
|
+
"Get the version number of your project"
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.details
|
50
|
+
[
|
51
|
+
"This action will return the current version number set on your project.",
|
52
|
+
"You first have to set up your Xcode project, if you haven't done it already:",
|
53
|
+
"https://developer.apple.com/library/ios/qa/qa1827/_index.html"
|
54
|
+
].join(' ')
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.available_options
|
58
|
+
[
|
59
|
+
FastlaneCore::ConfigItem.new(key: :xcodeproj,
|
60
|
+
env_name: "FL_VERSION_NUMBER_PROJECT",
|
61
|
+
description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
|
62
|
+
optional: true,
|
63
|
+
verify_block: Proc.new do |value|
|
64
|
+
raise "Please pass the path to the project, not the workspace".red if value.include?"workspace"
|
65
|
+
raise "Could not find Xcode project".red if (not File.exists?(value) and not Helper.is_test?)
|
66
|
+
end)
|
67
|
+
]
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.output
|
71
|
+
[
|
72
|
+
['VERSION_NUMBER', 'The version number']
|
73
|
+
]
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.authors
|
77
|
+
["Liquidsoul"]
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.is_supported?(platform)
|
81
|
+
[:ios, :mac].include?platform
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
File without changes
|
data/lib/fastlane/actions/ipa.rb
CHANGED
@@ -69,17 +69,18 @@ module Fastlane
|
|
69
69
|
Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = absolute_dsym_path
|
70
70
|
ENV[SharedValues::IPA_OUTPUT_PATH.to_s] = absolute_ipa_path # for deliver
|
71
71
|
ENV[SharedValues::DSYM_OUTPUT_PATH.to_s] = absolute_dsym_path
|
72
|
+
|
73
|
+
Helper.log.info "You are using legacy `shenzhen` to build your app".yellow
|
74
|
+
Helper.log.info "It is recommended to upgrade to `gym`".yellow
|
75
|
+
Helper.log.info "https://github.com/fastlane/gym".yellow
|
72
76
|
rescue => ex
|
73
77
|
[
|
74
78
|
"-------------------------------------------------------",
|
75
79
|
"Original Error:",
|
76
80
|
" => " + ex.to_s,
|
77
|
-
"A build error occured.
|
78
|
-
"it
|
79
|
-
"
|
80
|
-
"For code signing related issues, check out this guide:",
|
81
|
-
"https://github.com/KrauseFx/fastlane/blob/master/docs/CodeSigning.md",
|
82
|
-
"The command that was used by fastlane:",
|
81
|
+
"A build error occured. You are using legacy `shenzhen` for building",
|
82
|
+
"it is recommended to upgrade to `gym`: ",
|
83
|
+
"https://github.com/fastlane/gym",
|
83
84
|
core_command,
|
84
85
|
"-------------------------------------------------------"
|
85
86
|
].each do |txt|
|
@@ -198,7 +198,28 @@ module Fastlane
|
|
198
198
|
|
199
199
|
xcpretty_args = xcpretty_args.join(" ")
|
200
200
|
|
201
|
-
|
201
|
+
# In some cases the simulator is not booting up in time
|
202
|
+
# One way to solve it is to try to rerun it for one more time
|
203
|
+
begin
|
204
|
+
Actions.sh "set -o pipefail && xcodebuild #{xcodebuild_args} | xcpretty #{xcpretty_args}"
|
205
|
+
rescue => ex
|
206
|
+
exit_status = $?.exitstatus
|
207
|
+
|
208
|
+
raise_error = true
|
209
|
+
if exit_status.eql? 65
|
210
|
+
iphone_simulator_time_out_error = /iPhoneSimulator: Timed out waiting/
|
211
|
+
|
212
|
+
if (iphone_simulator_time_out_error =~ ex.message) != nil
|
213
|
+
raise_error = false
|
214
|
+
|
215
|
+
Helper.log.warn "First attempt failed with iPhone Simulator error: #{iphone_simulator_time_out_error.source}"
|
216
|
+
Helper.log.warn "Retrying once more..."
|
217
|
+
Actions.sh "set -o pipefail && xcodebuild #{xcodebuild_args} | xcpretty #{xcpretty_args}"
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
raise ex if raise_error
|
222
|
+
end
|
202
223
|
end
|
203
224
|
|
204
225
|
def self.hash_to_args(hash)
|
data/lib/fastlane/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.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: 2015-08-
|
11
|
+
date: 2015-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -461,7 +461,9 @@ files:
|
|
461
461
|
- lib/fastlane/actions/fastlane_version.rb
|
462
462
|
- lib/fastlane/actions/frameit.rb
|
463
463
|
- lib/fastlane/actions/gcovr.rb
|
464
|
+
- lib/fastlane/actions/get_build_number.rb
|
464
465
|
- lib/fastlane/actions/get_github_release.rb
|
466
|
+
- lib/fastlane/actions/get_version_number.rb
|
465
467
|
- lib/fastlane/actions/git_branch.rb
|
466
468
|
- lib/fastlane/actions/git_pull.rb
|
467
469
|
- lib/fastlane/actions/gym.rb
|
@@ -477,7 +479,7 @@ files:
|
|
477
479
|
- lib/fastlane/actions/increment_build_number.rb
|
478
480
|
- lib/fastlane/actions/increment_version_number.rb
|
479
481
|
- lib/fastlane/actions/install_carthage.rb
|
480
|
-
- lib/fastlane/actions/
|
482
|
+
- lib/fastlane/actions/install_cocoapods.rb
|
481
483
|
- lib/fastlane/actions/ipa.rb
|
482
484
|
- lib/fastlane/actions/lane_context.rb
|
483
485
|
- lib/fastlane/actions/last_git_tag.rb
|