fastlane 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/FastfileTemplate +3 -0
- data/lib/fastlane.rb +1 -0
- data/lib/fastlane/action.rb +5 -0
- data/lib/fastlane/action_collector.rb +3 -1
- data/lib/fastlane/actions/actions_helper.rb +5 -0
- data/lib/fastlane/actions/add_git_tag.rb +21 -15
- data/lib/fastlane/actions/cert.rb +2 -2
- data/lib/fastlane/actions/clean_build_artifacts.rb +1 -1
- data/lib/fastlane/actions/commit_version_bump.rb +15 -8
- data/lib/fastlane/actions/crashlytics.rb +51 -66
- data/lib/fastlane/actions/deliver.rb +32 -15
- data/lib/fastlane/actions/deploygate.rb +29 -22
- data/lib/fastlane/actions/ensure_git_status_clean.rb +1 -1
- data/lib/fastlane/actions/frameit.rb +2 -2
- data/lib/fastlane/actions/gcovr.rb +2 -2
- data/lib/fastlane/actions/hipchat.rb +36 -23
- data/lib/fastlane/actions/hockey.rb +37 -23
- data/lib/fastlane/actions/increment_build_number.rb +14 -19
- data/lib/fastlane/actions/increment_version_number.rb +42 -44
- data/lib/fastlane/actions/install_carthage.rb +1 -1
- data/lib/fastlane/actions/install_cocapods.rb +1 -1
- data/lib/fastlane/actions/ipa.rb +69 -47
- data/lib/fastlane/actions/notify.rb +1 -1
- data/lib/fastlane/actions/pem.rb +1 -1
- data/lib/fastlane/actions/produce.rb +3 -4
- data/lib/fastlane/actions/push_to_git_remote.rb +24 -14
- data/lib/fastlane/actions/register_devices.rb +23 -11
- data/lib/fastlane/actions/reset_git_repo.rb +13 -5
- data/lib/fastlane/actions/resign.rb +19 -16
- data/lib/fastlane/actions/s3.rb +56 -37
- data/lib/fastlane/actions/sigh.rb +1 -1
- data/lib/fastlane/actions/slack.rb +31 -13
- data/lib/fastlane/actions/snapshot.rb +13 -6
- data/lib/fastlane/actions/team_id.rb +1 -1
- data/lib/fastlane/actions/team_name.rb +1 -1
- data/lib/fastlane/actions/testmunk.rb +28 -14
- data/lib/fastlane/actions/typetalk.rb +1 -1
- data/lib/fastlane/actions/update_fastlane.rb +115 -0
- data/lib/fastlane/actions/update_project_code_signing.rb +22 -7
- data/lib/fastlane/actions/xcode_select.rb +1 -1
- data/lib/fastlane/actions/xcodebuild.rb +56 -12
- data/lib/fastlane/actions_list.rb +2 -2
- data/lib/fastlane/configuration_helper.rb +28 -0
- data/lib/fastlane/fast_file.rb +17 -0
- data/lib/fastlane/fastlane_folder.rb +3 -3
- data/lib/fastlane/setup.rb +11 -5
- data/lib/fastlane/version.rb +1 -1
- metadata +7 -5
@@ -7,9 +7,9 @@ module Fastlane
|
|
7
7
|
require 'frameit'
|
8
8
|
|
9
9
|
begin
|
10
|
-
FastlaneCore::UpdateChecker.start_looking_for_update('frameit')
|
10
|
+
FastlaneCore::UpdateChecker.start_looking_for_update('frameit') unless Helper.is_test?
|
11
11
|
color = Frameit::Editor::Color::BLACK
|
12
|
-
color = Frameit::Editor::Color::SILVER if [:silver, :white].include?(params
|
12
|
+
color = Frameit::Editor::Color::SILVER if [:silver, :white].include?(params)
|
13
13
|
|
14
14
|
screenshots_folder = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
|
15
15
|
screenshots_folder ||= FastlaneFolder.path
|
@@ -60,8 +60,8 @@ module Fastlane
|
|
60
60
|
gcovr_args = nil
|
61
61
|
|
62
62
|
# Allows for a whole variety of configurations
|
63
|
-
if params.
|
64
|
-
params_hash = params
|
63
|
+
if params.is_a? Hash
|
64
|
+
params_hash = params
|
65
65
|
|
66
66
|
# Check if an output path was given
|
67
67
|
if params_hash.has_key? :output
|
@@ -4,26 +4,12 @@ module Fastlane
|
|
4
4
|
end
|
5
5
|
|
6
6
|
class HipchatAction < Action
|
7
|
-
def self.run(
|
8
|
-
options = { message: '',
|
9
|
-
success: true,
|
10
|
-
channel: nil
|
11
|
-
}.merge(params.first || {})
|
12
|
-
|
7
|
+
def self.run(options)
|
13
8
|
require 'net/http'
|
14
9
|
require 'uri'
|
15
10
|
|
16
|
-
api_token =
|
17
|
-
api_version =
|
18
|
-
|
19
|
-
unless api_token
|
20
|
-
Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_TOKEN\"] = \"your token\"' to your Fastfile's `before_all` section.".red
|
21
|
-
raise 'No HIPCHAT_API_TOKEN given.'.red
|
22
|
-
end
|
23
|
-
if api_version.nil? || ![1, 2].include?(api_version[0].to_i)
|
24
|
-
Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_VERSION\"] = \"1 or 2\"' to your Fastfile's `before_all` section.".red
|
25
|
-
raise 'No HIPCHAT_API_VERSION given.'.red
|
26
|
-
end
|
11
|
+
api_token = options[:api_token]
|
12
|
+
api_version = options[:version]
|
27
13
|
|
28
14
|
channel = options[:channel]
|
29
15
|
color = (options[:success] ? 'green' : 'red')
|
@@ -94,12 +80,39 @@ module Fastlane
|
|
94
80
|
|
95
81
|
def self.available_options
|
96
82
|
[
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
83
|
+
FastlaneCore::ConfigItem.new(key: :message,
|
84
|
+
env_name: "FL_HIPCHAT_MESSAGE",
|
85
|
+
description: "The message to post on HipChat",
|
86
|
+
default_value: ''),
|
87
|
+
FastlaneCore::ConfigItem.new(key: :channel,
|
88
|
+
env_name: "FL_HIPCHAT_CHANNEL",
|
89
|
+
description: "The room or @username",
|
90
|
+
optional: true),
|
91
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
92
|
+
env_name: "HIPCHAT_API_TOKEN",
|
93
|
+
description: "Hipchat API Token",
|
94
|
+
verify_block: Proc.new do |value|
|
95
|
+
unless value.to_s.length > 0
|
96
|
+
Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_TOKEN\"] = \"your token\"' to your Fastfile's `before_all` section.".red
|
97
|
+
raise 'No HIPCHAT_API_TOKEN given.'.red
|
98
|
+
end
|
99
|
+
end),
|
100
|
+
FastlaneCore::ConfigItem.new(key: :success,
|
101
|
+
env_name: "FL_HIPCHAT_SUCCESS",
|
102
|
+
description: "Was this build successful? (true/false)",
|
103
|
+
optional: true,
|
104
|
+
default_value: true,
|
105
|
+
is_string: false),
|
106
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
107
|
+
env_name: "HIPCHAT_API_VERSION",
|
108
|
+
description: "Version of the Hipchat API. Must be 1 or 2",
|
109
|
+
verify_block: Proc.new do |value|
|
110
|
+
if api_version.nil? || ![1, 2].include?(api_version[0].to_i)
|
111
|
+
Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_VERSION\"] = \"1 or 2\"' to your Fastfile's `before_all` section.".red
|
112
|
+
raise 'No HIPCHAT_API_VERSION given.'.red
|
113
|
+
end
|
114
|
+
end)
|
115
|
+
]
|
103
116
|
end
|
104
117
|
|
105
118
|
def self.author
|
@@ -10,37 +10,25 @@ module Fastlane
|
|
10
10
|
end
|
11
11
|
|
12
12
|
class HockeyAction < Action
|
13
|
-
def self.run(
|
13
|
+
def self.run(options)
|
14
14
|
# Available options: http://support.hockeyapp.net/kb/api/api-versions#upload-version
|
15
|
-
options = {
|
16
|
-
notes: 'No changelog given',
|
17
|
-
status: 2,
|
18
|
-
notify: 1
|
19
|
-
}.merge(params.first)
|
20
|
-
|
21
|
-
options[:ipa] ||= Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
|
22
|
-
options[:dsym] ||= Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH]
|
23
15
|
|
24
16
|
require 'shenzhen'
|
25
17
|
require 'shenzhen/plugins/hockeyapp'
|
26
18
|
|
27
|
-
raise "No API Token for Hockey given, pass using `api_token: 'token'`. Open https://rink.hockeyapp.net/manage/auth_tokens to get one".red unless options[:api_token].to_s.length > 0
|
28
|
-
raise "No IPA file given or found, pass using `ipa: 'path.ipa'`".red unless options[:ipa]
|
29
|
-
raise "IPA file on path '#{File.expand_path(options[:ipa])}' not found".red unless File.exist?(options[:ipa])
|
30
|
-
|
31
19
|
if options[:dsym]
|
32
|
-
|
20
|
+
dsym_filename = options[:dsym]
|
33
21
|
else
|
34
22
|
dsym_path = options[:ipa].gsub('ipa', 'app.dSYM.zip')
|
35
23
|
if File.exist?(dsym_path)
|
36
|
-
|
24
|
+
dsym_filename = dsym_path
|
37
25
|
else
|
38
26
|
Helper.log.info "Symbols not found on path #{File.expand_path(dsym_path)}. Crashes won't be symbolicated properly".yellow
|
39
27
|
end
|
40
28
|
end
|
41
29
|
|
42
|
-
raise "Symbols on path '#{File.expand_path(
|
43
|
-
!File.exist?(
|
30
|
+
raise "Symbols on path '#{File.expand_path(dsym_filename)}' not found".red if (dsym_filename &&
|
31
|
+
!File.exist?(dsym_filename))
|
44
32
|
|
45
33
|
Helper.log.info 'Starting with ipa upload to HockeyApp... this could take some time.'.green
|
46
34
|
|
@@ -70,12 +58,38 @@ module Fastlane
|
|
70
58
|
|
71
59
|
def self.available_options
|
72
60
|
[
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
61
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
62
|
+
env_name: "FL_HOCKEY_API_TOKEN",
|
63
|
+
description: "API Token for Hockey Access",
|
64
|
+
verify_block: Proc.new do |value|
|
65
|
+
raise "No API token for Hockey given, pass using `api_token: 'token'`".red unless (value and not value.empty?)
|
66
|
+
end),
|
67
|
+
FastlaneCore::ConfigItem.new(key: :ipa,
|
68
|
+
env_name: "FL_HOCKEY_IPA",
|
69
|
+
description: "Path to your IPA file. Optional if you use the `ipa` or `xcodebuild` action",
|
70
|
+
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
71
|
+
verify_block: Proc.new do |value|
|
72
|
+
raise "No IPA file given or found, pass using `ipa: 'path/app.ipa'`".red unless File.exists?(value)
|
73
|
+
end),
|
74
|
+
FastlaneCore::ConfigItem.new(key: :dsym,
|
75
|
+
env_name: "FL_HOCKEY_DSYM",
|
76
|
+
description: "Path to your DSYM file",
|
77
|
+
optional: true,
|
78
|
+
verify_block: Proc.new do |value|
|
79
|
+
# validation is done in the action
|
80
|
+
end),
|
81
|
+
FastlaneCore::ConfigItem.new(key: :notes,
|
82
|
+
env_name: "FL_HOCKEY_NOTES",
|
83
|
+
description: "Beta Notes",
|
84
|
+
default_value: "No changelog given"),
|
85
|
+
FastlaneCore::ConfigItem.new(key: :notify,
|
86
|
+
env_name: "FL_HOCKEY_NOTIFY",
|
87
|
+
description: "Notify testers? 1 for yes",
|
88
|
+
default_value: 1),
|
89
|
+
FastlaneCore::ConfigItem.new(key: :status,
|
90
|
+
env_name: "FL_HOCKEY_STATUS",
|
91
|
+
description: "Download status: 1 = No user can download; 2 = Available for download",
|
92
|
+
default_value: "2")
|
79
93
|
]
|
80
94
|
end
|
81
95
|
|
@@ -17,22 +17,7 @@ module Fastlane
|
|
17
17
|
# Attention: This is NOT the version number - but the build number
|
18
18
|
|
19
19
|
begin
|
20
|
-
|
21
|
-
|
22
|
-
case first_param
|
23
|
-
when NilClass
|
24
|
-
custom_number = nil
|
25
|
-
folder = '.'
|
26
|
-
when Fixnum
|
27
|
-
custom_number = first_param
|
28
|
-
folder = '.'
|
29
|
-
when String
|
30
|
-
custom_number = first_param
|
31
|
-
folder = '.'
|
32
|
-
when Hash
|
33
|
-
custom_number = first_param[:build_number]
|
34
|
-
folder = first_param[:xcodeproj] ? File.join('.', first_param[:xcodeproj], '..') : '.'
|
35
|
-
end
|
20
|
+
folder = params[:xcodeproj] ? File.join('.', params[:xcodeproj], '..') : '.'
|
36
21
|
|
37
22
|
command_prefix = [
|
38
23
|
'cd',
|
@@ -43,7 +28,7 @@ module Fastlane
|
|
43
28
|
command = [
|
44
29
|
command_prefix,
|
45
30
|
'agvtool',
|
46
|
-
|
31
|
+
params[:build_number] ? "new-version -all #{params[:build_number]}" : 'next-version -all'
|
47
32
|
].join(' ')
|
48
33
|
|
49
34
|
if Helper.test?
|
@@ -69,8 +54,18 @@ module Fastlane
|
|
69
54
|
|
70
55
|
def self.available_options
|
71
56
|
[
|
72
|
-
|
73
|
-
|
57
|
+
FastlaneCore::ConfigItem.new(key: :build_number,
|
58
|
+
env_name: "FL_BUILD_NUMBER_BUILD_NUMBER",
|
59
|
+
description: "Change to a specific version",
|
60
|
+
optional: true,
|
61
|
+
is_string: false),
|
62
|
+
FastlaneCore::ConfigItem.new(key: :xcodeproj,
|
63
|
+
env_name: "FL_BUILD_NUMBER_PROJECT",
|
64
|
+
description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
|
65
|
+
verify_block: Proc.new do |value|
|
66
|
+
raise "Please pass the path to the project, not the workspace".red if value.include?"workspace"
|
67
|
+
raise "Could not find Xcode project".red if (not File.exists?(value) and not Helper.is_test?)
|
68
|
+
end)
|
74
69
|
]
|
75
70
|
end
|
76
71
|
|
@@ -16,34 +16,8 @@ module Fastlane
|
|
16
16
|
# https://developer.apple.com/library/ios/qa/qa1827/_index.html
|
17
17
|
|
18
18
|
begin
|
19
|
-
first_param = (params.first rescue nil)
|
20
19
|
folder = '.' #Current folder is the default folder
|
21
20
|
|
22
|
-
case first_param
|
23
|
-
when NilClass
|
24
|
-
release_task = 'patch' #Patch is the default action
|
25
|
-
when String
|
26
|
-
release_task = first_param
|
27
|
-
when Hash
|
28
|
-
release_task = first_param[:release_task] ? first_param[:release_task] : "patch"
|
29
|
-
folder = first_param[:xcodeproj] ? File.join('.', first_param[:xcodeproj], '..') : '.'
|
30
|
-
end
|
31
|
-
|
32
|
-
# Verify integrity
|
33
|
-
case release_task
|
34
|
-
when /\d.\d.\d/
|
35
|
-
specific_version_number = release_task
|
36
|
-
release_task = 'specific_version'
|
37
|
-
when "patch"
|
38
|
-
release_task = 'patch'
|
39
|
-
when "minor"
|
40
|
-
release_task = 'minor'
|
41
|
-
when "major"
|
42
|
-
release_task = "major"
|
43
|
-
else
|
44
|
-
raise 'Invalid parameter #{release_task}'
|
45
|
-
end
|
46
|
-
|
47
21
|
command_prefix = [
|
48
22
|
'cd',
|
49
23
|
File.expand_path(folder).shellescape,
|
@@ -55,7 +29,7 @@ module Fastlane
|
|
55
29
|
else
|
56
30
|
current_version = `#{command_prefix} agvtool what-marketing-version -terse1`.split("\n").last
|
57
31
|
raise 'Your current version (#{current_version}) does not respect the format A.B.C' unless current_version.match(/\d.\d.\d/)
|
58
|
-
#Check if CFBundleShortVersionString is the same for each occurrence
|
32
|
+
# Check if CFBundleShortVersionString is the same for each occurrence
|
59
33
|
allBundles = `#{command_prefix} agvtool what-marketing-version -terse`.split("\n")
|
60
34
|
allBundles.each do |bundle|
|
61
35
|
raise 'Ensure all you CFBundleShortVersionString are equals in your project ' unless bundle.end_with? "=#{current_version}"
|
@@ -63,21 +37,26 @@ module Fastlane
|
|
63
37
|
version_array = current_version.split(".").map(&:to_i)
|
64
38
|
end
|
65
39
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
40
|
+
if params[:version_number]
|
41
|
+
# Specific version
|
42
|
+
next_version_number = params[:version_number]
|
43
|
+
else
|
44
|
+
case params[:bump_type]
|
45
|
+
when "patch"
|
46
|
+
version_array[2] = version_array[2] + 1
|
47
|
+
next_version_number = version_array.join(".")
|
48
|
+
when "minor"
|
49
|
+
version_array[1] = version_array[1] + 1
|
50
|
+
version_array[2] = version_array[2] = 0
|
51
|
+
next_version_number = version_array.join(".")
|
52
|
+
when "major"
|
53
|
+
version_array[0] = version_array[0] + 1
|
54
|
+
version_array[1] = version_array[1] = 0
|
55
|
+
version_array[1] = version_array[2] = 0
|
56
|
+
next_version_number = version_array.join(".")
|
57
|
+
when "specific_version"
|
58
|
+
next_version_number = specific_version_number
|
59
|
+
end
|
81
60
|
end
|
82
61
|
|
83
62
|
command = [
|
@@ -112,8 +91,27 @@ module Fastlane
|
|
112
91
|
|
113
92
|
def self.available_options
|
114
93
|
[
|
115
|
-
|
116
|
-
|
94
|
+
FastlaneCore::ConfigItem.new(key: :bump_type,
|
95
|
+
env_name: "FL_VERSION_NUMBER_BUMP_TYPE",
|
96
|
+
description: "The type of this version bump. Available: patch, minor, major",
|
97
|
+
default_value: "patch",
|
98
|
+
verify_block: Proc.new do |value|
|
99
|
+
raise "Available values are 'patch', 'minor' and 'major'" unless ['patch', 'minor', 'major'].include?value
|
100
|
+
end),
|
101
|
+
FastlaneCore::ConfigItem.new(key: :version_number,
|
102
|
+
env_name: "FL_VERSION_NUMBER_VERSION_NUMBER",
|
103
|
+
description: "Change to a specific version. This will replace the bump type value",
|
104
|
+
optional: true,
|
105
|
+
verify_block: Proc.new do |value|
|
106
|
+
raise "Invalid version '#{value}' given. Must be x.y.z".red unless value.split(".").count == 3
|
107
|
+
end),
|
108
|
+
FastlaneCore::ConfigItem.new(key: :xcodeproj,
|
109
|
+
env_name: "FL_VERSION_NUMBER_PROJECT",
|
110
|
+
description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
|
111
|
+
verify_block: Proc.new do |value|
|
112
|
+
raise "Please pass the path to the project, not the workspace".red if value.include?"workspace"
|
113
|
+
raise "Could not find Xcode project".red unless File.exists?(value)
|
114
|
+
end)
|
117
115
|
]
|
118
116
|
end
|
119
117
|
|
data/lib/fastlane/actions/ipa.rb
CHANGED
@@ -5,20 +5,6 @@ module Fastlane
|
|
5
5
|
DSYM_OUTPUT_PATH = :DSYM_OUTPUT_PATH
|
6
6
|
end
|
7
7
|
|
8
|
-
# -w, --workspace WORKSPACE Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)
|
9
|
-
# -p, --project PROJECT Project (.xcodeproj) file to use to build app (automatically detected in current directory, overridden by --workspace option, if passed)
|
10
|
-
# -c, --configuration CONFIGURATION Configuration used to build
|
11
|
-
# -s, --scheme SCHEME Scheme used to build app
|
12
|
-
# --xcconfig XCCONFIG use an extra XCCONFIG file to build the app
|
13
|
-
# --xcargs XCARGS pass additional arguments to xcodebuild when building the app. Be sure to quote multiple args.
|
14
|
-
# --[no-]clean Clean project before building
|
15
|
-
# --[no-]archive Archive project after building
|
16
|
-
# -d, --destination DESTINATION Destination. Defaults to current directory
|
17
|
-
# -m, --embed PROVISION Sign .ipa file with .mobileprovision
|
18
|
-
# -i, --identity IDENTITY Identity to be used along with --embed
|
19
|
-
# --sdk SDK use SDK as the name or path of the base SDK when building the project
|
20
|
-
# --ipa IPA specify the name of the .ipa file to generate (including file extension)
|
21
|
-
|
22
8
|
ARGS_MAP = {
|
23
9
|
workspace: '-w',
|
24
10
|
project: '-p',
|
@@ -31,6 +17,7 @@ module Fastlane
|
|
31
17
|
identity: '-i',
|
32
18
|
sdk: '--sdk',
|
33
19
|
ipa: '--ipa',
|
20
|
+
xcconfig: '--xcconfig',
|
34
21
|
xcargs: '--xcargs',
|
35
22
|
}
|
36
23
|
|
@@ -48,24 +35,15 @@ module Fastlane
|
|
48
35
|
# The output directory of the IPA and dSYM
|
49
36
|
absolute_dest_directory = nil
|
50
37
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
if params.first.is_a? Hash
|
55
|
-
|
56
|
-
# Used to get the final path of the IPA and dSYM
|
57
|
-
if dest = params.first[:destination]
|
58
|
-
absolute_dest_directory = Dir.glob(dest).map(&File.method(:realpath)).first
|
59
|
-
end
|
60
|
-
|
61
|
-
# Maps nice developer build parameters to Shenzhen args
|
62
|
-
build_args = params_to_build_args(params.first)
|
63
|
-
|
64
|
-
else
|
65
|
-
build_args = params
|
38
|
+
# Used to get the final path of the IPA and dSYM
|
39
|
+
if dest = params[:destination]
|
40
|
+
absolute_dest_directory = Dir.glob(dest).map(&File.method(:realpath)).first
|
66
41
|
end
|
67
42
|
|
68
|
-
|
43
|
+
# Maps nice developer build parameters to Shenzhen args
|
44
|
+
build_args = params_to_build_args(params)
|
45
|
+
|
46
|
+
unless (params[:scheme] rescue nil)
|
69
47
|
Helper.log.warn "You haven't specified a scheme. This might cause problems. If you can't see any outupt, please pass a `scheme`"
|
70
48
|
end
|
71
49
|
|
@@ -96,10 +74,10 @@ module Fastlane
|
|
96
74
|
ENV[SharedValues::DSYM_OUTPUT_PATH.to_s] = absolute_dsym_path
|
97
75
|
end
|
98
76
|
|
99
|
-
def self.params_to_build_args(
|
100
|
-
|
101
|
-
params = params.delete_if { |k, v| (k != :clean && k != :archive) && v.nil? }
|
77
|
+
def self.params_to_build_args(config)
|
78
|
+
params = config.values
|
102
79
|
|
80
|
+
params = params.delete_if { |k, v| v.nil? }
|
103
81
|
params = fill_in_default_values(params)
|
104
82
|
|
105
83
|
# Maps nice developer param names to Shenzhen's `ipa build` arguments
|
@@ -108,6 +86,8 @@ module Fastlane
|
|
108
86
|
if args = ARGS_MAP[k]
|
109
87
|
if k == :clean
|
110
88
|
v == true ? '--clean' : '--no-clean'
|
89
|
+
elsif k == :archive
|
90
|
+
v == true ? '--archive' : nil
|
111
91
|
else
|
112
92
|
value = (v.to_s.length > 0 ? "\"#{v}\"" : '')
|
113
93
|
"#{ARGS_MAP[k]} #{value}".strip
|
@@ -143,20 +123,62 @@ module Fastlane
|
|
143
123
|
end
|
144
124
|
|
145
125
|
def self.available_options
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
126
|
+
[
|
127
|
+
FastlaneCore::ConfigItem.new(key: :workspace,
|
128
|
+
env_name: "IPA_WORKSPACE",
|
129
|
+
description: "WORKSPACE Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)",
|
130
|
+
optional: true),
|
131
|
+
FastlaneCore::ConfigItem.new(key: :project,
|
132
|
+
env_name: "IPA_PROJECT",
|
133
|
+
description: "Project (.xcodeproj) file to use to build app (automatically detected in current directory, overridden by --workspace option, if passed)",
|
134
|
+
optional: true),
|
135
|
+
FastlaneCore::ConfigItem.new(key: :configuration,
|
136
|
+
env_name: "IPA_CONFIGURATION",
|
137
|
+
description: "Configuration used to build",
|
138
|
+
optional: true),
|
139
|
+
FastlaneCore::ConfigItem.new(key: :scheme,
|
140
|
+
env_name: "IPA_SCHEME",
|
141
|
+
description: "Scheme used to build app",
|
142
|
+
optional: true),
|
143
|
+
FastlaneCore::ConfigItem.new(key: :clean,
|
144
|
+
env_name: "IPA_CLEAN",
|
145
|
+
description: "Clean project before building",
|
146
|
+
optional: true,
|
147
|
+
is_string: false),
|
148
|
+
FastlaneCore::ConfigItem.new(key: :archive,
|
149
|
+
env_name: "IPA_ARCHIVE",
|
150
|
+
description: "Archive project after building",
|
151
|
+
optional: true,
|
152
|
+
is_string: false),
|
153
|
+
FastlaneCore::ConfigItem.new(key: :destination,
|
154
|
+
env_name: "IPA_DESTINATION",
|
155
|
+
description: "Build destination. Defaults to current directory",
|
156
|
+
optional: true),
|
157
|
+
FastlaneCore::ConfigItem.new(key: :embed,
|
158
|
+
env_name: "IPA_EMBED",
|
159
|
+
description: "Sign .ipa file with .mobileprovision",
|
160
|
+
optional: true),
|
161
|
+
FastlaneCore::ConfigItem.new(key: :identity,
|
162
|
+
env_name: "IPA_IDENTITY",
|
163
|
+
description: "Identity to be used along with --embed",
|
164
|
+
optional: true),
|
165
|
+
FastlaneCore::ConfigItem.new(key: :sdk,
|
166
|
+
env_name: "IPA_SDK",
|
167
|
+
description: "Use SDK as the name or path of the base SDK when building the project",
|
168
|
+
optional: true),
|
169
|
+
FastlaneCore::ConfigItem.new(key: :ipa,
|
170
|
+
env_name: "IPA_IPA",
|
171
|
+
description: "Specify the name of the .ipa file to generate (including file extension)",
|
172
|
+
optional: true),
|
173
|
+
FastlaneCore::ConfigItem.new(key: :xcconfig,
|
174
|
+
env_name: "IPA_XCCONFIG",
|
175
|
+
description: "Use an extra XCCONFIG file to build the app",
|
176
|
+
optional: true),
|
177
|
+
FastlaneCore::ConfigItem.new(key: :xcargs,
|
178
|
+
env_name: "IPA_XCARGS",
|
179
|
+
description: "Pass additional arguments to xcodebuild when building the app. Be sure to quote multiple args",
|
180
|
+
optional: true),
|
181
|
+
]
|
160
182
|
end
|
161
183
|
|
162
184
|
def self.output
|