fastlane-plugin-polidea 0.2.1 → 0.2.2
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/fastlane/plugin/polidea/actions/extract_app_icon.rb +15 -8
- data/lib/fastlane/plugin/polidea/actions/mailgun.rb +3 -3
- data/lib/fastlane/plugin/polidea/actions/polidea_store.rb +2 -2
- data/lib/fastlane/plugin/polidea/actions/s3.rb +1 -6
- data/lib/fastlane/plugin/polidea/templates/installation_template.erb +1 -1
- data/lib/fastlane/plugin/polidea/templates/mailgun_template.erb +1 -1
- data/lib/fastlane/plugin/polidea/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df273bd2009b658356ce8c168af3878aa2b8c3eb
|
4
|
+
data.tar.gz: e376f516c6cf5024956475318aec84a33bbc89af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e03c849c68e5f0334dc19766d1dd53d3da65878c693bba87714aa5de504303769107274e8c90e7d73b52eb8cec4641df134c0e2c4a0c881aaceb8882a43f2fe8
|
7
|
+
data.tar.gz: 9c9779c71ab126f7b6f9cbedcb7a6e0251183248dd5cc400cc8e552eb2806106e8f66a0c22e4cef08a28c792af0be820ce90a82be56f60e69165cbd4259135d0
|
@@ -14,12 +14,14 @@ module Fastlane
|
|
14
14
|
# Gets icon from ipa/apk
|
15
15
|
icon_file = extract_icon(platform, config)
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
if icon_file
|
18
|
+
Actions.lane_context[SharedValues::ICON_OUTPUT_PATH] = icon_output_path
|
19
|
+
ENV[SharedValues::ICON_OUTPUT_PATH.to_s] = icon_output_path
|
20
|
+
UI.success("Successfully extracted app icon file to '#{Actions.lane_context[SharedValues::ICON_OUTPUT_PATH]}'")
|
21
|
+
icon_file
|
22
|
+
else
|
23
|
+
UI.important("No icon found.")
|
24
|
+
end
|
23
25
|
end
|
24
26
|
|
25
27
|
def self.extract_icon(platform, config)
|
@@ -41,7 +43,9 @@ module Fastlane
|
|
41
43
|
|
42
44
|
def self.extract_icon_from_ipa(ipa_file, icon_output_path)
|
43
45
|
info = FastlaneCore::IpaFileAnalyser.fetch_info_plist_file(ipa_file)
|
44
|
-
|
46
|
+
icon_files = ipa_icon_files(info)
|
47
|
+
return if icon_files.empty?
|
48
|
+
icon_file_name = icon_files.first
|
45
49
|
Zip::File.open(ipa_file) do |zipfile|
|
46
50
|
icon_file = self.largest_ios_icon(zipfile.glob("**/Payload/**/#{icon_file_name}*.png"))
|
47
51
|
return nil unless icon_file
|
@@ -60,7 +64,7 @@ module Fastlane
|
|
60
64
|
return primary_icon['CFBundleIconFiles']
|
61
65
|
end
|
62
66
|
end
|
63
|
-
|
67
|
+
[]
|
64
68
|
end
|
65
69
|
|
66
70
|
def self.largest_ios_icon(icons)
|
@@ -84,6 +88,7 @@ module Fastlane
|
|
84
88
|
def self.extract_icon_from_apk(apk_file, icon_output_path)
|
85
89
|
apk = Android::Apk.new(apk_file)
|
86
90
|
icon = largest_android_icon(apk)
|
91
|
+
return unless icon
|
87
92
|
icon_file = File.open(icon_output_path, 'wb')
|
88
93
|
icon_file.write icon[:data]
|
89
94
|
icon_file
|
@@ -104,6 +109,8 @@ module Fastlane
|
|
104
109
|
end
|
105
110
|
end
|
106
111
|
{ name: selected_icon[0], data: selected_icon[1] } if selected_icon
|
112
|
+
rescue
|
113
|
+
nil
|
107
114
|
end
|
108
115
|
|
109
116
|
######## common
|
@@ -103,9 +103,9 @@ module Fastlane
|
|
103
103
|
def self.inline_images(options)
|
104
104
|
base_path = "#{__dir__}/../templates/images"
|
105
105
|
options[:inline] = [
|
106
|
-
qr_code(options[:installation_link])
|
107
|
-
File.new(options[:app_icon])
|
106
|
+
qr_code(options[:installation_link])
|
108
107
|
]
|
108
|
+
options[:inline] << File.new(options[:app_icon]) if options[:app_icon]
|
109
109
|
images = [
|
110
110
|
"polidea-facebook-icon.png",
|
111
111
|
"polidea-github-icon.png",
|
@@ -139,7 +139,7 @@ module Fastlane
|
|
139
139
|
author: Actions.git_author_email,
|
140
140
|
last_commit: Actions.last_git_commit_message,
|
141
141
|
is_android: Actions.lane_context[Actions::SharedValues::PLATFORM_NAME] == :android,
|
142
|
-
app_icon: File.basename(options[:app_icon]),
|
142
|
+
app_icon: options[:app_icon] ? File.basename(options[:app_icon]) : nil,
|
143
143
|
app_name: options[:app_name],
|
144
144
|
app_version: options[:app_version],
|
145
145
|
build_number: options[:build_number],
|
@@ -144,7 +144,7 @@ module Fastlane
|
|
144
144
|
app_name = params[:app_name] || info['CFBundleName']
|
145
145
|
app_identifier = params[:bundle_id] || info['CFBundleIdentifier']
|
146
146
|
version = params[:bundle_version] || info['CFBundleShortVersionString']
|
147
|
-
href =
|
147
|
+
href = itms_href(params[:plist_url])
|
148
148
|
url_scheme = get_url_scheme(info)
|
149
149
|
when :android
|
150
150
|
manifest = Android::Apk.new(params[:apk]).manifest
|
@@ -225,7 +225,7 @@ module Fastlane
|
|
225
225
|
private_class_method :create_request
|
226
226
|
|
227
227
|
def self.itms_href(plist_url)
|
228
|
-
"itms-services://?action=download-manifest&url=#{plist_url}"
|
228
|
+
"itms-services://?action=download-manifest&url=#{CGI.escape(plist_url)}"
|
229
229
|
end
|
230
230
|
private_class_method :itms_href
|
231
231
|
|
@@ -358,12 +358,6 @@ module Fastlane
|
|
358
358
|
s3_path = directory_name + file
|
359
359
|
obj = bucket.objects[s3_path]
|
360
360
|
obj.write(file: local_path, content_type: content_type_for_file(local_path), acl: "public_read")
|
361
|
-
if obj.exists?
|
362
|
-
next
|
363
|
-
end
|
364
|
-
|
365
|
-
result = "Error while uploading file #{local_path}"
|
366
|
-
return result
|
367
361
|
end
|
368
362
|
end
|
369
363
|
|
@@ -426,6 +420,7 @@ module Fastlane
|
|
426
420
|
end
|
427
421
|
|
428
422
|
def self.upload_icon(icon_path, url_part, bucket, acl)
|
423
|
+
return unless icon_path
|
429
424
|
icon_file_basename = File.basename(icon_path)
|
430
425
|
icon_file = File.open(icon_path)
|
431
426
|
icon_file_name = "#{url_part}#{icon_file_basename}"
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<div class="installation-panel">
|
21
21
|
<div class="row">
|
22
22
|
<div class="small-2 medium-2 columns inner-element">
|
23
|
-
<% if app_icon
|
23
|
+
<% if app_icon %>
|
24
24
|
<img src="<%= app_icon %>" class="no-resize icon-margin"/>
|
25
25
|
<% else %>
|
26
26
|
<object type="image/svg+xml" data="installation-page/img/logo_square.svg"
|
@@ -1018,7 +1018,7 @@ img.polidea-logo {
|
|
1018
1018
|
<table class="two columns">
|
1019
1019
|
<tr>
|
1020
1020
|
<td>
|
1021
|
-
<% if app_icon
|
1021
|
+
<% if app_icon %>
|
1022
1022
|
<img src="cid:<%= app_icon %>" class="app-icon"/>
|
1023
1023
|
<% else %>
|
1024
1024
|
<img src="cid:icon-placeholder.png" class="app-icon logo-decoration"/>
|