fastlane-plugin-branding 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f6aaf67a5a8ca8c88c88d45ca4881f4035f1abc
|
4
|
+
data.tar.gz: 2291d2750f5de36dce068c6bd8f7a32da17223dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e36d24a9c5c61b6e2001c1960ce69c1e26fbe13bef5eafcc779c6ca4997ed5a32c9814f16b8b27373c45d1034f6aaa693d7c96b7abf0f6de2fe4e8352f418b
|
7
|
+
data.tar.gz: f6ca7ac324edd7bafd26d588ce852aba92b92e5c9faf215f24caceacee114ce3615e50edd8a62e370e0fb3294ed8554d17bdc605ac005c216ead6940f670210c
|
@@ -4,12 +4,14 @@ module Fastlane
|
|
4
4
|
module Actions
|
5
5
|
class BrandingAction < Action
|
6
6
|
def self.run(params)
|
7
|
-
rows, cols = Branding::Canvas.terminal_size
|
7
|
+
rows, cols = ::Branding::Canvas.terminal_size
|
8
8
|
ideal_width = cols / 6
|
9
|
-
path = best_icon(ideal_width)
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
if path = best_icon(ideal_width)
|
10
|
+
logo = ::Branding::Logo.new(path)
|
11
|
+
logo.algo = :hires
|
12
|
+
logo.print
|
13
|
+
puts
|
14
|
+
end
|
13
15
|
end
|
14
16
|
|
15
17
|
def self.description
|
@@ -37,10 +39,10 @@ module Fastlane
|
|
37
39
|
end
|
38
40
|
|
39
41
|
def self.best_icon(ideal_width)
|
40
|
-
icon_paths = Dir.glob("**/AppIcon.
|
42
|
+
icon_paths = Dir.glob("**/AppIcon.appiconset/*.png").map(&File.method(:realpath))
|
41
43
|
|
42
44
|
paths = icon_paths.sort_by do |path|
|
43
|
-
png = PNG.from_file(path)
|
45
|
+
png = ::Branding::PNG.from_file(path)
|
44
46
|
(ideal_width - png.width).abs
|
45
47
|
end
|
46
48
|
|