fastlane-plugin-sq_ci_tools 1.0.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 +7 -0
- data/LICENSE +21 -0
- data/README.md +52 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_add_version_tag_action.rb +51 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_build_ios_application_action.rb +129 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_get_app_version_string_action.rb +74 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_get_bundle_identifier_action.rb +51 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_get_last_version_code_from_google_play_action.rb +59 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_get_team_identifier_action.rb +51 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb +57 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_prepare_keychain_action.rb +50 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_send_telegram_message_action.rb +64 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_set_version_code_action.rb +48 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_upload_aab_to_google_play_action.rb +69 -0
- data/lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_upload_file_to_s3_action.rb +84 -0
- data/lib/fastlane/plugin/sq_ci_tools/helper/sq_ci_tools_helper.rb +194 -0
- data/lib/fastlane/plugin/sq_ci_tools/version.rb +5 -0
- data/lib/fastlane/plugin/sq_ci_tools.rb +14 -0
- data/lib/sq_ci_tools/android_app/options.rb +28 -0
- data/lib/sq_ci_tools/code_signing/options.rb +43 -0
- data/lib/sq_ci_tools/google_play/options.rb +38 -0
- data/lib/sq_ci_tools/ios_app/options.rb +64 -0
- data/lib/sq_ci_tools/keychain/options.rb +27 -0
- data/lib/sq_ci_tools/s3/options.rb +48 -0
- data/lib/sq_ci_tools/shared/options.rb +21 -0
- data/lib/sq_ci_tools/sq_ci_tools.rb +2 -0
- data/lib/sq_ci_tools/telegram/options.rb +35 -0
- metadata +195 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/sq_ci_tools_helper'
|
3
|
+
require_relative '../../../../sq_ci_tools/android_app/options'
|
4
|
+
|
5
|
+
module Fastlane
|
6
|
+
module Actions
|
7
|
+
class SqCiToolsSetVersionCodeAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
gradle_file_path = Helper::SqCiToolsHelper.get_gradle_file_path(params[:gradle_file_path])
|
10
|
+
new_version_code = Helper::SqCiToolsHelper.get_new_version_code(gradle_file_path, params[:version_code])
|
11
|
+
|
12
|
+
Helper::SqCiToolsHelper.save_key_to_gradle_file(gradle_file_path, "versionCode", new_version_code)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.description
|
16
|
+
'Set version code for Android application'
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.details
|
20
|
+
''
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.available_options
|
24
|
+
[
|
25
|
+
FastlaneCore::ConfigItem.new(
|
26
|
+
key: :version_code,
|
27
|
+
description: 'Version code to set',
|
28
|
+
optional: false,
|
29
|
+
type: String
|
30
|
+
)
|
31
|
+
] +
|
32
|
+
::SqCiTools::AndroidApp::Options.options
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.return_value
|
36
|
+
''
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.authors
|
40
|
+
['Semen Kologrivov']
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.is_supported?(_)
|
44
|
+
true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/sq_ci_tools_helper'
|
3
|
+
require_relative '../../../../sq_ci_tools/google_play/options'
|
4
|
+
require_relative '../../../../sq_ci_tools/android_app/options'
|
5
|
+
require_relative '../../../../sq_ci_tools/shared/options'
|
6
|
+
|
7
|
+
module Fastlane
|
8
|
+
module Actions
|
9
|
+
class SqCiToolsUploadAabToGooglePlayAction < Action
|
10
|
+
def self.run(params)
|
11
|
+
google_play_client = Supply::Client.make_from_config(
|
12
|
+
params: {
|
13
|
+
json_key: params[:json_key_file],
|
14
|
+
timeout: params[:timeout]
|
15
|
+
}
|
16
|
+
)
|
17
|
+
|
18
|
+
Supply.config = params
|
19
|
+
|
20
|
+
google_play_client.begin_edit(
|
21
|
+
package_name: params[:package_name]
|
22
|
+
)
|
23
|
+
|
24
|
+
google_play_client.upload_bundle(
|
25
|
+
params[:aab_path]
|
26
|
+
)
|
27
|
+
google_play_client.commit_current_edit!
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.description
|
31
|
+
'Upload aab file to the Google Play'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.details
|
35
|
+
''
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.available_options
|
39
|
+
[
|
40
|
+
FastlaneCore::ConfigItem.new(
|
41
|
+
key: :aab_path,
|
42
|
+
description: "Path to the aab file",
|
43
|
+
optional: false,
|
44
|
+
type: String
|
45
|
+
)
|
46
|
+
] +
|
47
|
+
::SqCiTools::GooglePlay::Options.options +
|
48
|
+
::SqCiTools::AndroidApp::Options.options +
|
49
|
+
::SqCiTools::Shared::Options.options
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.return_type
|
53
|
+
:string
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.return_value
|
57
|
+
''
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.authors
|
61
|
+
['Semen Kologrivov']
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.is_supported?(_)
|
65
|
+
true
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/sq_ci_tools_helper'
|
3
|
+
require_relative '../../../../sq_ci_tools/s3/options'
|
4
|
+
require 'aws-sdk-core'
|
5
|
+
|
6
|
+
module Fastlane
|
7
|
+
module Actions
|
8
|
+
class SqCiToolsToolsUploadFileToS3Action < Action
|
9
|
+
def self.run(params)
|
10
|
+
access_key = params[:s3_access_key_id]
|
11
|
+
key_secret = params[:s3_secret_access_key]
|
12
|
+
bucket_name = params[:s3_bucket_name]
|
13
|
+
region_name = params[:s3_region_name]
|
14
|
+
endpoint = params[:s3_endpoint]
|
15
|
+
|
16
|
+
file_path = params[:file_path]
|
17
|
+
filename = File.basename(file_path)
|
18
|
+
file_key = [params[:relative_path], filename].compact.reject(&:empty?).join("/")
|
19
|
+
|
20
|
+
credentials = Aws::Credentials.new(access_key, key_secret)
|
21
|
+
s3_client = Aws::S3::Client.new(
|
22
|
+
region: region_name,
|
23
|
+
credentials: credentials,
|
24
|
+
endpoint: endpoint
|
25
|
+
)
|
26
|
+
|
27
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Client.html#put_object-instance_method
|
28
|
+
s3_client.put_object(
|
29
|
+
acl: 'public-read',
|
30
|
+
body: File.open(file_path),
|
31
|
+
bucket: bucket_name,
|
32
|
+
key: file_key
|
33
|
+
)
|
34
|
+
|
35
|
+
uploaded_object = Aws::S3::Object.new(bucket_name, file_key, client: s3_client)
|
36
|
+
public_url = uploaded_object.public_url
|
37
|
+
|
38
|
+
return public_url
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.description
|
42
|
+
'Upload file to S3-compatible storage'
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.details
|
46
|
+
''
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.available_options
|
50
|
+
[
|
51
|
+
FastlaneCore::ConfigItem.new(
|
52
|
+
key: :file_path,
|
53
|
+
description: 'Path to file for upload',
|
54
|
+
optional: false,
|
55
|
+
type: String
|
56
|
+
),
|
57
|
+
FastlaneCore::ConfigItem.new(
|
58
|
+
key: :relative_path,
|
59
|
+
description: 'Relative path to file on s3 storage',
|
60
|
+
optional: true,
|
61
|
+
type: String
|
62
|
+
)
|
63
|
+
] +
|
64
|
+
::SqCiTools::S3::Options.options
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.return_type
|
68
|
+
:string
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.return_value
|
72
|
+
'Link for uploaded file'
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.authors
|
76
|
+
['Semen Kologrivov']
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.is_supported?(_)
|
80
|
+
true
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,194 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require 'fastlane_core/ui/ui'
|
3
|
+
|
4
|
+
require 'xcodeproj'
|
5
|
+
require "shellwords"
|
6
|
+
require "tempfile"
|
7
|
+
require "fileutils"
|
8
|
+
|
9
|
+
module Fastlane
|
10
|
+
UI = FastlaneCore::UI unless Fastlane.const_defined?(:UI)
|
11
|
+
|
12
|
+
module Helper
|
13
|
+
class SqCiToolsHelper
|
14
|
+
GRADLE_FILE_TEST = "/tmp/fastlane/tests/versioning/app/build.gradle"
|
15
|
+
|
16
|
+
def self.notification_message(app_name:, app_version_string:, app_type:, links:)
|
17
|
+
if app_type == "beta"
|
18
|
+
message = "Коллеги, сборка приложения '#{app_name}' #{app_version_string} готова к тестированию!"
|
19
|
+
elsif app_type == "rc"
|
20
|
+
message = "Коллеги, предрелизная сборка приложения '#{app_name}' #{app_version_string} готова к тестированию!"
|
21
|
+
elsif app_type == "release"
|
22
|
+
message = "Коллеги, сборка приложения '#{app_name}' #{app_version_string} отправлена на ревью!"
|
23
|
+
else
|
24
|
+
return ""
|
25
|
+
end
|
26
|
+
|
27
|
+
return message if links.nil? || links.length == 0
|
28
|
+
|
29
|
+
links_message = links
|
30
|
+
.select { |link| !link[:url].nil? }
|
31
|
+
.map { |link| "#{link[:name] || 'Ссылка на установку'}: #{link[:url]}" }
|
32
|
+
.join("\n\n")
|
33
|
+
|
34
|
+
"#{message}\n\n#{links_message}"
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.add_target_attributes(target_name:, project_path:)
|
38
|
+
project = Xcodeproj::Project.open(project_path)
|
39
|
+
|
40
|
+
project.targets.each do |target|
|
41
|
+
next unless target.name == target_name
|
42
|
+
|
43
|
+
next unless project.root_object.attributes['TargetAttributes'].nil?
|
44
|
+
|
45
|
+
project.root_object.attributes['TargetAttributes'] = {}
|
46
|
+
target_attributes = project.root_object.attributes['TargetAttributes']
|
47
|
+
target_attributes[target.uuid] = { "CreatedOnToolsVersion" => "9.4.1" }
|
48
|
+
end
|
49
|
+
|
50
|
+
project.save
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.get_gradle_file(gradle_file)
|
54
|
+
return Helper.test? ? GRADLE_FILE_TEST : gradle_file
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.get_gradle_file_path(gradle_file)
|
58
|
+
gradle_file = self.get_gradle_file(gradle_file)
|
59
|
+
return File.expand_path(gradle_file)
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.get_new_version_code(gradle_file, new_version_code)
|
63
|
+
if new_version_code.nil?
|
64
|
+
current_version_code = self.read_key_from_gradle_file(gradle_file, "versionCode")
|
65
|
+
new_version_code = current_version_code.to_i + 1
|
66
|
+
end
|
67
|
+
|
68
|
+
return new_version_code.to_i
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.get_new_version_name(gradle_file, new_version_name, bump_type = nil)
|
72
|
+
if new_version_name.nil?
|
73
|
+
new_version_name = self.read_key_from_gradle_file(gradle_file, "versionName")
|
74
|
+
end
|
75
|
+
|
76
|
+
current_version_parts = new_version_name.split(/[.]/)
|
77
|
+
major = current_version_parts[0].to_i
|
78
|
+
minor = current_version_parts[1].to_i
|
79
|
+
patch = current_version_parts[2].to_i
|
80
|
+
|
81
|
+
if bump_type == "major"
|
82
|
+
new_version_name = "#{major + 1}.0.0"
|
83
|
+
elsif bump_type == "minor"
|
84
|
+
new_version_name = "#{major}.#{minor + 1}.0"
|
85
|
+
elsif bump_type == "patch"
|
86
|
+
new_version_name = "#{major}.#{minor}.#{patch + 1}"
|
87
|
+
end
|
88
|
+
|
89
|
+
return new_version_name.to_s
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.read_key_from_gradle_file(gradle_file, key)
|
93
|
+
value = false
|
94
|
+
begin
|
95
|
+
file = File.new(gradle_file, "r")
|
96
|
+
while (line = file.gets)
|
97
|
+
next unless line.include?(key)
|
98
|
+
|
99
|
+
components = line.strip.split(' ')
|
100
|
+
value = components[components.length - 1].tr("\"", "")
|
101
|
+
break
|
102
|
+
end
|
103
|
+
file.close
|
104
|
+
rescue StandardError => e
|
105
|
+
UI.error("An exception occured while reading gradle file: #{e}")
|
106
|
+
e
|
107
|
+
end
|
108
|
+
return value
|
109
|
+
end
|
110
|
+
|
111
|
+
def self.save_key_to_gradle_file(gradle_file, key, value)
|
112
|
+
current_value = self.read_key_from_gradle_file(gradle_file, key)
|
113
|
+
|
114
|
+
begin
|
115
|
+
found = false
|
116
|
+
temp_file = Tempfile.new("flSave_#{key}_ToGradleFile")
|
117
|
+
File.open(gradle_file, "r") do |file|
|
118
|
+
file.each_line do |line|
|
119
|
+
if line.include?(key) and found == false
|
120
|
+
found = true
|
121
|
+
line.replace(line.sub(current_value.to_s, value.to_s))
|
122
|
+
end
|
123
|
+
temp_file.puts(line)
|
124
|
+
end
|
125
|
+
file.close
|
126
|
+
end
|
127
|
+
temp_file.rewind
|
128
|
+
temp_file.close
|
129
|
+
FileUtils.mv(temp_file.path, gradle_file)
|
130
|
+
temp_file.unlink
|
131
|
+
end
|
132
|
+
|
133
|
+
return found == true ? value : -1
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.get_xcodeproj_build_config(xcodeproj_path, main_target, target_scheme)
|
137
|
+
project = Xcodeproj::Project.open(xcodeproj_path)
|
138
|
+
target = project.native_targets.find { |native_target| native_target.name == main_target }
|
139
|
+
target.build_configurations.find { |configuration| configuration.name == target_scheme }
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.get_xcodeproj_targets(xcodeproj_path, target_scheme)
|
143
|
+
project = Xcodeproj::Project.open(xcodeproj_path)
|
144
|
+
targets = {}
|
145
|
+
project.native_targets.each do |native_target|
|
146
|
+
build_configuration = native_target.build_configurations.find { |configuration| configuration.name == target_scheme }
|
147
|
+
targets[native_target.name] = self.resolve_recursive_build_setting(build_configuration, 'PRODUCT_BUNDLE_IDENTIFIER')
|
148
|
+
end
|
149
|
+
|
150
|
+
targets
|
151
|
+
end
|
152
|
+
|
153
|
+
def self.resolve_recursive_build_setting(config, setting)
|
154
|
+
resolution = config.resolve_build_setting(setting)
|
155
|
+
|
156
|
+
# finds values with one of
|
157
|
+
# $VALUE
|
158
|
+
# $(VALLUE)
|
159
|
+
# $(VALUE:modifier)
|
160
|
+
# ${VALUE}
|
161
|
+
# ${VALUE:modifier}
|
162
|
+
resolution.gsub(/\$[\(\{]?.+[\)\}]?/) do |raw_value|
|
163
|
+
# strip $() characters
|
164
|
+
unresolved = raw_value.gsub(/[\$\(\)\{\}]/, '')
|
165
|
+
|
166
|
+
# Get the modifiers after the ':' characters
|
167
|
+
name, *modifiers = unresolved.split(':')
|
168
|
+
|
169
|
+
# Expand variable name
|
170
|
+
subresolution = resolve_recursive_build_setting(config, name)
|
171
|
+
|
172
|
+
# Apply modifiers
|
173
|
+
# NOTE: not all cases accounted for
|
174
|
+
#
|
175
|
+
# See http://codeworkshop.net/posts/xcode-build-setting-transformations
|
176
|
+
# for various modifier options
|
177
|
+
modifiers.each do |modifier|
|
178
|
+
case modifier
|
179
|
+
when 'lower'
|
180
|
+
subresolution.downcase!
|
181
|
+
when 'upper'
|
182
|
+
subresolution.upcase!
|
183
|
+
else
|
184
|
+
# Fastlane message
|
185
|
+
UI.error("Unknown modifier: `#{modifier}` in `#{raw_value}")
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
subresolution
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module SqCiTools
|
3
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
4
|
+
def self.all_classes
|
5
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
# By default we want to import all available actions and helpers
|
11
|
+
# A plugin can contain any number of actions and plugins
|
12
|
+
Fastlane::SqCiTools.all_classes.each do |current|
|
13
|
+
require current
|
14
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'credentials_manager/appfile_config'
|
3
|
+
|
4
|
+
module SqCiTools
|
5
|
+
module AndroidApp
|
6
|
+
class Options
|
7
|
+
def self.options
|
8
|
+
[
|
9
|
+
FastlaneCore::ConfigItem.new(
|
10
|
+
key: :package_name,
|
11
|
+
env_name: "SQ_CI_PACKAGE_NAME",
|
12
|
+
description: "The package name of the Android application to use",
|
13
|
+
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:package_name),
|
14
|
+
default_value_dynamic: true
|
15
|
+
),
|
16
|
+
FastlaneCore::ConfigItem.new(
|
17
|
+
key: :gradle_file_path,
|
18
|
+
env_name: 'SQ_CI_GRADLE_FILE_PATH',
|
19
|
+
description: 'Path to build.gradle file',
|
20
|
+
default_value: "app/build.gradle",
|
21
|
+
optional: true,
|
22
|
+
type: String
|
23
|
+
)
|
24
|
+
]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'credentials_manager/appfile_config'
|
3
|
+
|
4
|
+
module SqCiTools
|
5
|
+
module CodeSigning
|
6
|
+
class Options
|
7
|
+
def self.options
|
8
|
+
[
|
9
|
+
FastlaneCore::ConfigItem.new(
|
10
|
+
key: :code_signing_type,
|
11
|
+
env_name: 'SQ_CI_CODE_SIGNING_TYPE',
|
12
|
+
description: 'Targets in project',
|
13
|
+
optional: true,
|
14
|
+
type: String,
|
15
|
+
default_value: 'appstore'
|
16
|
+
),
|
17
|
+
FastlaneCore::ConfigItem.new(
|
18
|
+
key: :code_sign_identity,
|
19
|
+
env_name: 'SQ_CI_CODE_SIGN_IDENTITY',
|
20
|
+
description: 'Code sign identity for profile',
|
21
|
+
optional: true,
|
22
|
+
type: String,
|
23
|
+
default_value: 'iPhone Distribution'
|
24
|
+
),
|
25
|
+
FastlaneCore::ConfigItem.new(
|
26
|
+
key: :certificates_repo,
|
27
|
+
env_name: 'SQ_CI_CERTIFICATES_REPO',
|
28
|
+
description: 'Repository for store certificates and profiles',
|
29
|
+
optional: false,
|
30
|
+
type: String
|
31
|
+
),
|
32
|
+
FastlaneCore::ConfigItem.new(
|
33
|
+
key: :certificates_password,
|
34
|
+
env_name: 'SQ_CI_CERTIFICATES_PASSWORD',
|
35
|
+
description: 'Password for certificates and profiles storage',
|
36
|
+
optional: false,
|
37
|
+
type: String
|
38
|
+
)
|
39
|
+
]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'credentials_manager/appfile_config'
|
3
|
+
|
4
|
+
module SqCiTools
|
5
|
+
module GooglePlay
|
6
|
+
class Options
|
7
|
+
def self.options
|
8
|
+
[
|
9
|
+
FastlaneCore::ConfigItem.new(
|
10
|
+
key: :json_key_file,
|
11
|
+
env_name: "SQ_CI_JSON_KEY_FILE",
|
12
|
+
optional: true,
|
13
|
+
description: "The path to a file containing service account JSON, used to authenticate with Google",
|
14
|
+
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:json_key_file),
|
15
|
+
default_value_dynamic: true,
|
16
|
+
verify_block: proc do |value|
|
17
|
+
UI.user_error!("Could not find service account json file at path '#{File.expand_path(value)}'") unless File.exist?(File.expand_path(value))
|
18
|
+
UI.user_error!("'#{value}' doesn't seem to be a JSON file") unless FastlaneCore::Helper.json_file?(File.expand_path(value))
|
19
|
+
end
|
20
|
+
),
|
21
|
+
FastlaneCore::ConfigItem.new(
|
22
|
+
key: :changes_not_sent_for_review,
|
23
|
+
env_name: "SQ_CI_CHANGES_NOT_SENT_FOR_REVIEW",
|
24
|
+
description: "Indicates that the changes in this edit will not be reviewed until they are explicitly sent for review from the Google Play Console UI",
|
25
|
+
default_value: false
|
26
|
+
),
|
27
|
+
FastlaneCore::ConfigItem.new(
|
28
|
+
key: :ack_bundle_installation_warning,
|
29
|
+
env_name: "ACK_BUNDLE_INSTALLATION_WARNING",
|
30
|
+
description: "Must be set to true if the bundle installation may trigger a warning on user devices (e.g can only be downloaded over wifi). Typically this is required for bundles over 150MB",
|
31
|
+
optional: true,
|
32
|
+
default_value: false
|
33
|
+
)
|
34
|
+
]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'credentials_manager/appfile_config'
|
3
|
+
|
4
|
+
module SqCiTools
|
5
|
+
module IosApp
|
6
|
+
class Options
|
7
|
+
def self.options
|
8
|
+
[
|
9
|
+
FastlaneCore::ConfigItem.new(
|
10
|
+
key: :project_path,
|
11
|
+
env_name: 'SQ_CI_PROJECT_PATH',
|
12
|
+
description: 'Path to project',
|
13
|
+
optional: true,
|
14
|
+
type: String
|
15
|
+
),
|
16
|
+
FastlaneCore::ConfigItem.new(
|
17
|
+
key: :workspace_path,
|
18
|
+
env_name: 'SQ_CI_WORKSPACE_PATH',
|
19
|
+
description: 'Path to workspace',
|
20
|
+
optional: true,
|
21
|
+
type: String
|
22
|
+
),
|
23
|
+
FastlaneCore::ConfigItem.new(
|
24
|
+
key: :main_target,
|
25
|
+
description: 'Name of main target',
|
26
|
+
env_name: 'SQ_CI_MAIN_TARGET',
|
27
|
+
optional: true,
|
28
|
+
type: String
|
29
|
+
),
|
30
|
+
FastlaneCore::ConfigItem.new(
|
31
|
+
key: :export_method,
|
32
|
+
env_name: 'SQ_CI_EXPORT_METHOD',
|
33
|
+
description: 'Export method for build',
|
34
|
+
optional: true,
|
35
|
+
type: String,
|
36
|
+
default_value: "app-store"
|
37
|
+
),
|
38
|
+
FastlaneCore::ConfigItem.new(
|
39
|
+
key: :build_args,
|
40
|
+
env_name: 'SQ_CI_BUILD_ARGS',
|
41
|
+
description: 'Additional args for project build',
|
42
|
+
optional: true,
|
43
|
+
type: String,
|
44
|
+
default_value: "-skipPackagePluginValidation -skipMacroValidation -allowProvisioningUpdates"
|
45
|
+
),
|
46
|
+
FastlaneCore::ConfigItem.new(
|
47
|
+
key: :should_clear_project,
|
48
|
+
env_name: 'SQ_CI_SHOULD_CLEAR_PROJECT',
|
49
|
+
description: 'Should clear project before build',
|
50
|
+
optional: true,
|
51
|
+
default_value: true
|
52
|
+
),
|
53
|
+
FastlaneCore::ConfigItem.new(
|
54
|
+
key: :derived_data_path,
|
55
|
+
env_name: 'SQ_CI_DERIVED_DATA_PATH',
|
56
|
+
description: 'Path to derived data folder',
|
57
|
+
optional: true,
|
58
|
+
type: String
|
59
|
+
)
|
60
|
+
]
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'credentials_manager/appfile_config'
|
3
|
+
|
4
|
+
module SqCiTools
|
5
|
+
module Keychain
|
6
|
+
class Options
|
7
|
+
def self.options
|
8
|
+
[
|
9
|
+
FastlaneCore::ConfigItem.new(
|
10
|
+
key: :keychain_name,
|
11
|
+
env_name: 'SQ_CI_KEYCHAIN_NAME',
|
12
|
+
description: 'Keychain name for storing certificates',
|
13
|
+
optional: false,
|
14
|
+
type: String
|
15
|
+
),
|
16
|
+
FastlaneCore::ConfigItem.new(
|
17
|
+
key: :keychain_password,
|
18
|
+
env_name: 'SQ_CI_KEYCHAIN_PASSWORD',
|
19
|
+
description: 'Password for keychain for storing certificates',
|
20
|
+
optional: false,
|
21
|
+
type: String
|
22
|
+
)
|
23
|
+
]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'credentials_manager/appfile_config'
|
3
|
+
|
4
|
+
module SqCiTools
|
5
|
+
module S3
|
6
|
+
class Options
|
7
|
+
def self.options
|
8
|
+
[
|
9
|
+
FastlaneCore::ConfigItem.new(
|
10
|
+
key: :s3_access_key_id,
|
11
|
+
env_name: 'SQ_CI_S3_ACCESS_KEY_ID',
|
12
|
+
description: 'Identifier for S3 access key',
|
13
|
+
optional: false,
|
14
|
+
type: String
|
15
|
+
),
|
16
|
+
FastlaneCore::ConfigItem.new(
|
17
|
+
key: :s3_secret_access_key,
|
18
|
+
env_name: 'SQ_CI_S3_SECRET_ACCESS_KEY',
|
19
|
+
description: 'Secret for S3 access key',
|
20
|
+
optional: false,
|
21
|
+
type: String
|
22
|
+
),
|
23
|
+
FastlaneCore::ConfigItem.new(
|
24
|
+
key: :s3_region_name,
|
25
|
+
env_name: 'SQ_CI_S3_REGION_NAME',
|
26
|
+
description: 'Region name of S3 storage',
|
27
|
+
optional: false,
|
28
|
+
type: String
|
29
|
+
),
|
30
|
+
FastlaneCore::ConfigItem.new(
|
31
|
+
key: :s3_bucket_name,
|
32
|
+
env_name: 'SQ_CI_S3_BUCKET_NAME',
|
33
|
+
description: 'S3\'s bucket name',
|
34
|
+
optional: false,
|
35
|
+
type: String
|
36
|
+
),
|
37
|
+
FastlaneCore::ConfigItem.new(
|
38
|
+
key: :s3_endpoint,
|
39
|
+
env_name: 'SQ_CI_S3_ENDPOINT',
|
40
|
+
description: 'Endpoint for S3 storage',
|
41
|
+
optional: false,
|
42
|
+
type: String
|
43
|
+
)
|
44
|
+
]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'credentials_manager/appfile_config'
|
3
|
+
|
4
|
+
module SqCiTools
|
5
|
+
module Shared
|
6
|
+
class Options
|
7
|
+
def self.options
|
8
|
+
[
|
9
|
+
FastlaneCore::ConfigItem.new(
|
10
|
+
key: :timeout,
|
11
|
+
env_name: "SQ_CI_TIMEOUT",
|
12
|
+
optional: true,
|
13
|
+
description: "Timeout for read, open, and send (in seconds)",
|
14
|
+
type: Integer,
|
15
|
+
default_value: 300
|
16
|
+
)
|
17
|
+
]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|