fastlane-plugin-polidea 0.4.5 → 0.5.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/plugin/polidea/actions/extract_app_icon.rb +5 -1
- data/lib/fastlane/plugin/polidea/actions/extract_app_info.rb +217 -0
- data/lib/fastlane/plugin/polidea/actions/extract_app_name.rb +5 -1
- data/lib/fastlane/plugin/polidea/actions/extract_version.rb +5 -1
- data/lib/fastlane/plugin/polidea/actions/get_binary_size.rb +1 -1
- data/lib/fastlane/plugin/polidea/actions/s3.rb +6 -1
- data/lib/fastlane/plugin/polidea/actions/shuttle.rb +216 -0
- data/lib/fastlane/plugin/polidea/version.rb +1 -1
- metadata +21 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29cfc7e9d826bfb2c77feee47a09e2dc935db2cc
|
4
|
+
data.tar.gz: ba60a5da2d99437007c682d508a034c7708ea3eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e38c360adbd5b9062619f399b90153ab04ebc063e2d79c8319ee82693941ed8464b136515c0163ad49efb8d7848b8fdc4e9333ce76f9bc5916ecab10cd21c7c
|
7
|
+
data.tar.gz: 96e19007b8dcf91555fb62d5730084358fc59338eac3bfd85e776fc9848dab0e629a773ba9ada2cedf2da31694f486ef34058f31ec9e7c26d79341b731e3e83a
|
@@ -123,7 +123,7 @@ module Fastlane
|
|
123
123
|
end
|
124
124
|
|
125
125
|
def self.description
|
126
|
-
"Extracts largest icon from .ipa/.apk"
|
126
|
+
"Extracts largest icon from .ipa/.apk, use `extract_app_info` instead"
|
127
127
|
end
|
128
128
|
|
129
129
|
def self.available_options
|
@@ -159,6 +159,10 @@ module Fastlane
|
|
159
159
|
def self.is_supported?(platform)
|
160
160
|
[:ios, :android].include? platform
|
161
161
|
end
|
162
|
+
|
163
|
+
def self.category
|
164
|
+
:deprecated
|
165
|
+
end
|
162
166
|
end
|
163
167
|
end
|
164
168
|
end
|
@@ -0,0 +1,217 @@
|
|
1
|
+
require 'ruby_apk'
|
2
|
+
|
3
|
+
Zip.warn_invalid_date = false
|
4
|
+
|
5
|
+
module Fastlane
|
6
|
+
module Actions
|
7
|
+
module SharedValues
|
8
|
+
APP_NAME = :APP_NAME
|
9
|
+
APP_IDENTIFIER = :APP_IDENTIFIER
|
10
|
+
ICON_OUTPUT_PATH = :ICON_OUTPUT_PATH
|
11
|
+
BINARY_SIZE = :BINARY_SIZE
|
12
|
+
APP_VERSION = :APP_VERSION
|
13
|
+
BUILD_NUMBER = :BUILD_NUMBER
|
14
|
+
end
|
15
|
+
|
16
|
+
class ExtractAppInfoAction < Action
|
17
|
+
def self.run(config)
|
18
|
+
platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME].to_sym
|
19
|
+
|
20
|
+
icon_output_path = config[:icon_output_path]
|
21
|
+
|
22
|
+
validate(platform, config)
|
23
|
+
|
24
|
+
app_name, app_identifier = extract_app_name(platform, config)
|
25
|
+
app_icon = extract_icon(platform, config) if icon_output_path
|
26
|
+
binary_size = extract_binary_size(platform, config)
|
27
|
+
app_version, build_number = extract_version(platform, config)
|
28
|
+
|
29
|
+
publish_shared_values(
|
30
|
+
SharedValues::APP_NAME => app_name,
|
31
|
+
SharedValues::APP_IDENTIFIER => app_identifier,
|
32
|
+
SharedValues::ICON_OUTPUT_PATH => app_icon.nil? ? nil : icon_output_path,
|
33
|
+
SharedValues::BINARY_SIZE => binary_size,
|
34
|
+
SharedValues::APP_VERSION => app_version,
|
35
|
+
SharedValues::BUILD_NUMBER => build_number
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.validate(platform, config)
|
40
|
+
case platform
|
41
|
+
when :ios
|
42
|
+
UI.user_error!("No IPA file path given, pass using `ipa: 'ipa path'`") unless config[:ipa].to_s.length > 0
|
43
|
+
when :android
|
44
|
+
UI.user_error!("No APK file path given, pass using `apk: 'apk path'`") unless config[:apk].to_s.length > 0
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.publish_shared_values(config)
|
49
|
+
config.each do |key, value|
|
50
|
+
if value
|
51
|
+
Actions.lane_context[key] = value
|
52
|
+
ENV[key.to_s] = value.to_s
|
53
|
+
else
|
54
|
+
Actions.lane_context[key] = nil
|
55
|
+
UI.important("Value for #{key} not found.")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
FastlaneCore::PrintTable.print_values(config: config,
|
60
|
+
hide_keys: [],
|
61
|
+
title: "Summary for extract_app_info")
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.extract_app_name(platform, config)
|
65
|
+
case platform
|
66
|
+
when :ios
|
67
|
+
info = FastlaneCore::IpaFileAnalyser.fetch_info_plist_file(config[:ipa])
|
68
|
+
return info['CFBundleName'], info['CFBundleIdentifier']
|
69
|
+
when :android
|
70
|
+
apk = Android::Apk.new(config[:apk])
|
71
|
+
return apk.manifest.label, apk.manifest.package_name
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.extract_icon(platform, config)
|
76
|
+
case platform
|
77
|
+
when :ios
|
78
|
+
extract_icon_from_ipa(config[:ipa], config[:icon_output_path])
|
79
|
+
when :android
|
80
|
+
extract_icon_from_apk(config[:apk], config[:icon_output_path])
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.extract_binary_size(platform, config)
|
85
|
+
case platform
|
86
|
+
when :ios
|
87
|
+
File.open(config[:ipa]).size
|
88
|
+
when :android
|
89
|
+
File.open(config[:apk]).size
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.extract_version(platform, config)
|
94
|
+
case platform
|
95
|
+
when :ios
|
96
|
+
info = FastlaneCore::IpaFileAnalyser.fetch_info_plist_file(config[:ipa])
|
97
|
+
return info['CFBundleShortVersionString'], info['CFBundleVersion'].to_i
|
98
|
+
when :android
|
99
|
+
apk = Android::Apk.new(config[:apk])
|
100
|
+
return apk.manifest.version_name, apk.manifest.version_code
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.extract_icon_from_apk(apk_file, icon_output_path)
|
105
|
+
apk = Android::Apk.new(apk_file)
|
106
|
+
icon = largest_android_icon(apk)
|
107
|
+
return unless icon
|
108
|
+
icon_file = File.open(icon_output_path, 'wb')
|
109
|
+
icon_file.write icon[:data]
|
110
|
+
icon_file
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.largest_android_icon(apk)
|
114
|
+
icons = apk.icon
|
115
|
+
selected_icon = icons.max_by do |name, _|
|
116
|
+
case name
|
117
|
+
when /x*hdpi/
|
118
|
+
name.count "x"
|
119
|
+
when /mdpi/
|
120
|
+
-1
|
121
|
+
when %r{\/drawable\/}
|
122
|
+
-2
|
123
|
+
else
|
124
|
+
-3
|
125
|
+
end
|
126
|
+
end
|
127
|
+
{ name: selected_icon[0], data: selected_icon[1] } if selected_icon
|
128
|
+
rescue
|
129
|
+
nil
|
130
|
+
end
|
131
|
+
|
132
|
+
def self.extract_icon_from_ipa(ipa_file, icon_output_path)
|
133
|
+
info = FastlaneCore::IpaFileAnalyser.fetch_info_plist_file(ipa_file)
|
134
|
+
icon_files = ipa_icon_files(info)
|
135
|
+
return if icon_files.empty?
|
136
|
+
icon_file_name = icon_files.first
|
137
|
+
Zip::File.open(ipa_file) do |zipfile|
|
138
|
+
icon_file = self.largest_ios_icon(zipfile.glob("**/Payload/**/#{icon_file_name}*.png"))
|
139
|
+
return nil unless icon_file
|
140
|
+
tmp_path = "/tmp/app_icon.png"
|
141
|
+
File.write(tmp_path, zipfile.read(icon_file))
|
142
|
+
Actions.sh("xcrun -sdk iphoneos pngcrush -revert-iphone-optimizations #{tmp_path} #{icon_output_path}")
|
143
|
+
File.delete(tmp_path)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def self.ipa_icon_files(info)
|
148
|
+
icons = info['CFBundleIcons']
|
149
|
+
unless icons.nil?
|
150
|
+
primary_icon = icons['CFBundlePrimaryIcon']
|
151
|
+
unless primary_icon.nil?
|
152
|
+
return primary_icon['CFBundleIconFiles']
|
153
|
+
end
|
154
|
+
end
|
155
|
+
[]
|
156
|
+
end
|
157
|
+
|
158
|
+
def self.largest_ios_icon(icons)
|
159
|
+
icons.max_by do |file, _|
|
160
|
+
case file.name
|
161
|
+
when /@(\d+)x/
|
162
|
+
$1.to_i
|
163
|
+
else
|
164
|
+
1
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
def self.description
|
170
|
+
"Extract information from .ipa/.apk"
|
171
|
+
end
|
172
|
+
|
173
|
+
def self.available_options
|
174
|
+
[
|
175
|
+
FastlaneCore::ConfigItem.new(key: :ipa,
|
176
|
+
env_name: "",
|
177
|
+
description: ".ipa file to extract icon",
|
178
|
+
optional: true,
|
179
|
+
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]),
|
180
|
+
FastlaneCore::ConfigItem.new(key: :apk,
|
181
|
+
env_name: "",
|
182
|
+
description: ".apk file to extract icon",
|
183
|
+
optional: true,
|
184
|
+
default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]),
|
185
|
+
FastlaneCore::ConfigItem.new(key: :icon_output_path,
|
186
|
+
env_name: "",
|
187
|
+
description: "icon output path",
|
188
|
+
optional: true,
|
189
|
+
default_value: "./app_icon.png")
|
190
|
+
]
|
191
|
+
end
|
192
|
+
|
193
|
+
def self.output
|
194
|
+
[
|
195
|
+
['APP_NAME', 'App name extracted from .ipa/.apk'],
|
196
|
+
['APP_IDENTIFIER', 'Bundle id or package name extracted from .ipa/.apk'],
|
197
|
+
['ICON_OUTPUT_PATH', 'Path to app icon extracted from .ipa/.apk'],
|
198
|
+
['BINARY_SIZE', 'Size of .ipa/.apk in bytes'],
|
199
|
+
['APP_VERSION', 'App version extracted from .ipa/.apk'],
|
200
|
+
['BUILD_NUMBER', 'Build number extracted from .ipa/.apk']
|
201
|
+
]
|
202
|
+
end
|
203
|
+
|
204
|
+
def self.author
|
205
|
+
"Piotrek Dubiel"
|
206
|
+
end
|
207
|
+
|
208
|
+
def self.is_supported?(platform)
|
209
|
+
[:ios, :android].include? platform
|
210
|
+
end
|
211
|
+
|
212
|
+
def self.category
|
213
|
+
:project
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
@@ -57,7 +57,7 @@ module Fastlane
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def self.description
|
60
|
-
"Extracts application name from .apk/.ipa"
|
60
|
+
"Extracts application name from .apk/.ipa, use `extract_app_info` instead"
|
61
61
|
end
|
62
62
|
|
63
63
|
def self.available_options
|
@@ -88,6 +88,10 @@ module Fastlane
|
|
88
88
|
def self.is_supported?(platform)
|
89
89
|
[:ios, :android].include? platform
|
90
90
|
end
|
91
|
+
|
92
|
+
def self.category
|
93
|
+
:deprecated
|
94
|
+
end
|
91
95
|
end
|
92
96
|
end
|
93
97
|
end
|
@@ -61,7 +61,7 @@ module Fastlane
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def self.description
|
64
|
-
"Extracts application version and build number from .ipa/.apk"
|
64
|
+
"Extracts application version and build number from .ipa/.apk, use `extract_app_info` instead"
|
65
65
|
end
|
66
66
|
|
67
67
|
def self.available_options
|
@@ -93,6 +93,10 @@ module Fastlane
|
|
93
93
|
def self.is_supported?(platform)
|
94
94
|
[:ios, :android].include? platform
|
95
95
|
end
|
96
|
+
|
97
|
+
def self.category
|
98
|
+
:deprecated
|
99
|
+
end
|
96
100
|
end
|
97
101
|
end
|
98
102
|
end
|
@@ -343,7 +343,7 @@ module Fastlane
|
|
343
343
|
end
|
344
344
|
|
345
345
|
# Return public url
|
346
|
-
obj.public_url.to_s
|
346
|
+
shorten_url(obj.public_url.to_s)
|
347
347
|
end
|
348
348
|
|
349
349
|
def self.upload_directory(bucket, directory_name, directory_path, acl)
|
@@ -423,6 +423,11 @@ module Fastlane
|
|
423
423
|
self.upload_file(bucket, icon_file_name, icon_file, acl)
|
424
424
|
end
|
425
425
|
|
426
|
+
def self.shorten_url(url)
|
427
|
+
uri = URI.parse(url)
|
428
|
+
uri.scheme + ':/' + uri.path
|
429
|
+
end
|
430
|
+
|
426
431
|
def self.description
|
427
432
|
"Generates a plist file and uploads all to AWS S3"
|
428
433
|
end
|
@@ -0,0 +1,216 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'uri'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module Fastlane
|
6
|
+
module Actions
|
7
|
+
class ShuttleAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME].to_sym
|
10
|
+
options = {
|
11
|
+
api_token: params[:api_token],
|
12
|
+
plist_url: params[:plist_url],
|
13
|
+
prefix_schema: params[:prefix_schema],
|
14
|
+
apk_url: params[:apk_url],
|
15
|
+
app_identifier: params[:app_identifier],
|
16
|
+
app_version: params[:app_version],
|
17
|
+
build_number: params[:build_number],
|
18
|
+
binary_size: params[:binary_size],
|
19
|
+
release_notes: params[:release_notes],
|
20
|
+
releaser: params[:releaser]
|
21
|
+
}
|
22
|
+
validate(platform, options)
|
23
|
+
config = get_config(platform, options)
|
24
|
+
notify(platform, config)
|
25
|
+
|
26
|
+
UI.success("Successfully uploaded to #{params[:app_identifier]} #{params[:app_version]}.#{params[:build_number]} to Shuttle")
|
27
|
+
end
|
28
|
+
|
29
|
+
#####################################################
|
30
|
+
# @!group Documentation
|
31
|
+
#####################################################
|
32
|
+
|
33
|
+
def self.description
|
34
|
+
"Shuttle upload action"
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.details
|
38
|
+
"Notify Shuttle about new app version"
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.author
|
42
|
+
["Piotrek Dubiel"]
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.available_options
|
46
|
+
[
|
47
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
48
|
+
env_name: "SHUTTLE_API_TOKEN",
|
49
|
+
description: "API Token for Shuttle",
|
50
|
+
verify_block: proc do |api_token|
|
51
|
+
UI.user_error!("No API token for Shuttle given, pass using `api_token: 'token'`") unless api_token and !api_token.empty?
|
52
|
+
end),
|
53
|
+
FastlaneCore::ConfigItem.new(key: :plist_url,
|
54
|
+
env_name: "SHUTTLE_PLIST_URL",
|
55
|
+
description: "Url to uploaded plist",
|
56
|
+
default_value: Actions.lane_context[SharedValues::S3_PLIST_OUTPUT_PATH],
|
57
|
+
optional: true),
|
58
|
+
FastlaneCore::ConfigItem.new(key: :prefix_schema,
|
59
|
+
env_name: "SHUTTLE_PREFIX_SCHEMA",
|
60
|
+
description: "Prefix schema in uploaded app",
|
61
|
+
default_value: Actions.lane_context[SharedValues::PREFIX_SCHEMA],
|
62
|
+
optional: true),
|
63
|
+
FastlaneCore::ConfigItem.new(key: :apk_url,
|
64
|
+
env_name: "SHUTTLE_APK_URL",
|
65
|
+
description: "Url to uploaded apk",
|
66
|
+
default_value: Actions.lane_context[SharedValues::S3_APK_OUTPUT_PATH],
|
67
|
+
optional: true),
|
68
|
+
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
69
|
+
description: "App identifier, either bundle id or package name",
|
70
|
+
type: String,
|
71
|
+
default_value: Actions.lane_context[SharedValues::APP_IDENTIFIER]),
|
72
|
+
FastlaneCore::ConfigItem.new(key: :app_version,
|
73
|
+
description: "App version, eg. '1.0.0''",
|
74
|
+
type: String,
|
75
|
+
default_value: Actions.lane_context[SharedValues::APP_VERSION]),
|
76
|
+
FastlaneCore::ConfigItem.new(key: :build_number,
|
77
|
+
description: "Build number, eg. 1337",
|
78
|
+
is_string: false,
|
79
|
+
default_value: Actions.lane_context[SharedValues::BUILD_NUMBER],
|
80
|
+
verify_block: proc do |build_number|
|
81
|
+
UI.user_error!("No value found for 'build_number'") unless build_number and build_number.kind_of? Integer
|
82
|
+
end),
|
83
|
+
FastlaneCore::ConfigItem.new(key: :binary_size,
|
84
|
+
description: ".ipa/.apk binary size in bytes",
|
85
|
+
is_string: false,
|
86
|
+
default_value: Actions.lane_context[SharedValues::BINARY_SIZE],
|
87
|
+
verify_block: proc do |binary_size|
|
88
|
+
UI.user_error!("No value found for 'binary_size'") unless binary_size and binary_size.kind_of? Integer
|
89
|
+
end),
|
90
|
+
FastlaneCore::ConfigItem.new(key: :release_notes,
|
91
|
+
description: "Release notes to be attached to uploaded version",
|
92
|
+
type: String,
|
93
|
+
optional: true,
|
94
|
+
default_value: Actions.lane_context[SharedValues::RELEASE_NOTES]),
|
95
|
+
FastlaneCore::ConfigItem.new(key: :releaser,
|
96
|
+
description: "Releaser email",
|
97
|
+
type: String,
|
98
|
+
optional: true)
|
99
|
+
]
|
100
|
+
end
|
101
|
+
|
102
|
+
def self.is_supported?(platform)
|
103
|
+
[:ios, :android].include? platform
|
104
|
+
end
|
105
|
+
|
106
|
+
def self.validate(platform, params)
|
107
|
+
case platform
|
108
|
+
when :android
|
109
|
+
apk_url = params[:apk_url]
|
110
|
+
UI.user_error!("No apk url given, pass using `apk_url: 'url'` or make sure s3 action succeded and exposed S3_APK_OUTPUT_PATH shared value") unless apk_url and !apk_url.empty?
|
111
|
+
when :ios
|
112
|
+
plist_url = params[:plist_url]
|
113
|
+
UI.user_error!("No plist url given, pass using `plist_url: 'url'` or make sure s3 action succeded and exposed S3_PLIST_OUTPUT_PATH shared value") unless plist_url and !plist_url.empty?
|
114
|
+
url_scheme = params[:prefix_schema]
|
115
|
+
UI.user_error!("No prefix scheme given. Make sure `add_prefix_schema` action succeded before build action") if url_scheme.nil?
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def self.get_config(platform, params)
|
120
|
+
api_token = params[:api_token]
|
121
|
+
app_identifier = params[:app_identifier]
|
122
|
+
app_version = params[:app_version]
|
123
|
+
build_number = params[:build_number]
|
124
|
+
binary_size = params[:binary_size]
|
125
|
+
release_notes = params[:release_notes]
|
126
|
+
releaser = params[:releaser] || commit_author
|
127
|
+
|
128
|
+
case platform
|
129
|
+
when :ios
|
130
|
+
href = itms_href(params[:plist_url])
|
131
|
+
prefix_schema = params[:prefix_schema]
|
132
|
+
when :android
|
133
|
+
href = params[:apk_url]
|
134
|
+
end
|
135
|
+
|
136
|
+
{
|
137
|
+
api_token: api_token,
|
138
|
+
app_identifier: app_identifier,
|
139
|
+
app_version: app_version,
|
140
|
+
build_number: build_number,
|
141
|
+
href: href,
|
142
|
+
release_notes: release_notes,
|
143
|
+
releaser: releaser,
|
144
|
+
binary_size: binary_size,
|
145
|
+
prefix_schema: prefix_schema
|
146
|
+
}
|
147
|
+
end
|
148
|
+
|
149
|
+
def self.notify(platform, params)
|
150
|
+
uri = URI.parse(url(platform, params[:app_identifier]))
|
151
|
+
|
152
|
+
build = {
|
153
|
+
href: params[:href],
|
154
|
+
version: params[:app_version],
|
155
|
+
releaseNotes: params[:release_notes],
|
156
|
+
bytes: params[:binary_size],
|
157
|
+
releaserEmail: params[:releaser]
|
158
|
+
}
|
159
|
+
|
160
|
+
build[:prefixSchema] = params[:prefix_schema] if platform == :ios
|
161
|
+
build[:versionCode] = params[:build_number] if platform == :android
|
162
|
+
|
163
|
+
make_request(uri, create_request(uri, params[:api_token], {
|
164
|
+
build: build
|
165
|
+
}))
|
166
|
+
end
|
167
|
+
private_class_method :notify
|
168
|
+
|
169
|
+
def self.url(platform, app_identifier)
|
170
|
+
"#{base_url}/cd/apps/#{platform}/#{app_identifier}/builds"
|
171
|
+
end
|
172
|
+
private_class_method :url
|
173
|
+
|
174
|
+
def self.base_url
|
175
|
+
"https://store2.polidea.com"
|
176
|
+
end
|
177
|
+
private_class_method :base_url
|
178
|
+
|
179
|
+
def self.create_request(uri, access_token, params)
|
180
|
+
req = Net::HTTP::Post.new(uri.request_uri)
|
181
|
+
req['Content-Type'] = 'application/json'
|
182
|
+
req['Access-Token'] = access_token
|
183
|
+
req.body = JSON.generate(params)
|
184
|
+
req
|
185
|
+
end
|
186
|
+
|
187
|
+
def self.itms_href(plist_url)
|
188
|
+
"itms-services://?action=download-manifest&url=#{URI.encode_www_form_component(plist_url)}"
|
189
|
+
end
|
190
|
+
private_class_method :itms_href
|
191
|
+
|
192
|
+
def self.commit_author
|
193
|
+
sh("git --no-pager show -s --format='%ae'", print_command: false, print_command_output: false).strip
|
194
|
+
end
|
195
|
+
private_class_method :commit_author
|
196
|
+
|
197
|
+
def self.make_request(uri, request, limit = 10)
|
198
|
+
raise ArgumentError, 'HTTP redirect too deep' if limit.zero?
|
199
|
+
|
200
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
201
|
+
|
202
|
+
if uri.instance_of?(URI::HTTPS)
|
203
|
+
http.use_ssl = true
|
204
|
+
end
|
205
|
+
|
206
|
+
response = http.request(request)
|
207
|
+
case response
|
208
|
+
when Net::HTTPSuccess then response
|
209
|
+
when Net::HTTPRedirection then make_request(URI.parse(response['location']), request, limit - 1)
|
210
|
+
else
|
211
|
+
UI.user_error! JSON.parse(response.body)['message']
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-polidea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotrek Dubiel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plist
|
@@ -156,20 +156,34 @@ dependencies:
|
|
156
156
|
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: simplecov
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
159
173
|
- !ruby/object:Gem::Dependency
|
160
174
|
name: fastlane
|
161
175
|
requirement: !ruby/object:Gem::Requirement
|
162
176
|
requirements:
|
163
177
|
- - ">="
|
164
178
|
- !ruby/object:Gem::Version
|
165
|
-
version: 1.
|
179
|
+
version: 1.100.0
|
166
180
|
type: :development
|
167
181
|
prerelease: false
|
168
182
|
version_requirements: !ruby/object:Gem::Requirement
|
169
183
|
requirements:
|
170
184
|
- - ">="
|
171
185
|
- !ruby/object:Gem::Version
|
172
|
-
version: 1.
|
186
|
+
version: 1.100.0
|
173
187
|
description:
|
174
188
|
email: piotr.dubiel@polidea.com
|
175
189
|
executables: []
|
@@ -181,6 +195,7 @@ files:
|
|
181
195
|
- lib/fastlane/plugin/polidea.rb
|
182
196
|
- lib/fastlane/plugin/polidea/actions/add_prefix_schema.rb
|
183
197
|
- lib/fastlane/plugin/polidea/actions/extract_app_icon.rb
|
198
|
+
- lib/fastlane/plugin/polidea/actions/extract_app_info.rb
|
184
199
|
- lib/fastlane/plugin/polidea/actions/extract_app_name.rb
|
185
200
|
- lib/fastlane/plugin/polidea/actions/extract_version.rb
|
186
201
|
- lib/fastlane/plugin/polidea/actions/get_binary_size.rb
|
@@ -189,6 +204,7 @@ files:
|
|
189
204
|
- lib/fastlane/plugin/polidea/actions/polidea_store.rb
|
190
205
|
- lib/fastlane/plugin/polidea/actions/release_notes.rb
|
191
206
|
- lib/fastlane/plugin/polidea/actions/s3.rb
|
207
|
+
- lib/fastlane/plugin/polidea/actions/shuttle.rb
|
192
208
|
- lib/fastlane/plugin/polidea/helper/page_generator.rb
|
193
209
|
- lib/fastlane/plugin/polidea/helper/qr_generator.rb
|
194
210
|
- lib/fastlane/plugin/polidea/templates/images/icon-placeholder.png
|
@@ -306,7 +322,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
322
|
version: '0'
|
307
323
|
requirements: []
|
308
324
|
rubyforge_project:
|
309
|
-
rubygems_version: 2.6.
|
325
|
+
rubygems_version: 2.6.7
|
310
326
|
signing_key:
|
311
327
|
specification_version: 4
|
312
328
|
summary: Polidea's fastlane action
|