fastlane-plugin-icon_versioning 1.1.1 → 1.1.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/README.md +1 -0
- data/lib/fastlane/plugin/icon_versioning/actions/icon_versioning_action.rb +8 -78
- data/lib/fastlane/plugin/icon_versioning/actions/version_icon_action.rb +92 -0
- data/lib/fastlane/plugin/icon_versioning/helper/{icon_versioning_helper.rb → version_icon_helper.rb} +5 -3
- data/lib/fastlane/plugin/icon_versioning/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82d1d032b7ce422d1fb0d748d3a158bd9e7dcad9
|
4
|
+
data.tar.gz: 0b12e1a6604c765f1e8b08dd4c930c4451db73e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 969bc76c0919823f4e236232ffd4b68101b239207257affa314c5e7b8b75e8ad91776584d2336deba4c802f509f16be01e5130ae500dc1b253f5036eeae06114
|
7
|
+
data.tar.gz: 9f0b38c180c88bf57df4b87604be79bf4e73c897b981db30bf2777d0bcbacd0d1b486090754a63bf140f17f8b7ac5178dd49f480eca76644f0d3ee0f85ae95c6
|
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
[](https://rubygems.org/gems/fastlane-plugin-icon_versioning)
|
4
4
|
[](https://travis-ci.org/revolter/fastlane-plugin-icon_versioning)
|
5
5
|
[](https://coveralls.io/github/revolter/fastlane-plugin-icon_versioning)
|
6
|
+
[](https://codeclimate.com/github/revolter/fastlane-plugin-icon_versioning/maintainability)
|
6
7
|
|
7
8
|
## Getting Started
|
8
9
|
|
@@ -1,91 +1,21 @@
|
|
1
1
|
require 'fastlane/action'
|
2
|
-
require_relative '
|
2
|
+
require_relative 'version_icon_action'
|
3
3
|
|
4
4
|
module Fastlane
|
5
5
|
module Actions
|
6
|
-
class IconVersioningAction <
|
6
|
+
class IconVersioningAction < VersionIconAction
|
7
7
|
def self.run(params)
|
8
|
-
|
8
|
+
UI.important('This action was deprecated. Please use "version_icon" instead.')
|
9
9
|
|
10
|
-
return
|
10
|
+
return super
|
11
11
|
end
|
12
12
|
|
13
|
-
def self.
|
14
|
-
|
13
|
+
def self.category
|
14
|
+
:deprecated
|
15
15
|
end
|
16
16
|
|
17
|
-
def self.
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
def self.available_options
|
22
|
-
[
|
23
|
-
FastlaneCore::ConfigItem.new(
|
24
|
-
key: :appiconset_path,
|
25
|
-
env_name: 'ICON_VERSIONING_APPICONSET_PATH',
|
26
|
-
description: 'The path to the `.appiconset` directory containing the icon images',
|
27
|
-
verify_block: proc do |value|
|
28
|
-
path = File.expand_path(value.to_s)
|
29
|
-
|
30
|
-
UI.user_error!('Appiconset not found') unless File.exist?(path)
|
31
|
-
UI.user_error!('Appiconset is not a directory') unless File.directory?(path)
|
32
|
-
UI.user_error!('Appiconset does not end with .appiconset') unless path.end_with?('.appiconset')
|
33
|
-
end,
|
34
|
-
type: String
|
35
|
-
),
|
36
|
-
FastlaneCore::ConfigItem.new(
|
37
|
-
key: :text,
|
38
|
-
env_name: 'ICON_VERSIONING_TEXT',
|
39
|
-
description: 'The text to overlay over the icon images',
|
40
|
-
type: String
|
41
|
-
),
|
42
|
-
FastlaneCore::ConfigItem.new(
|
43
|
-
key: :band_height_percentage,
|
44
|
-
env_name: 'ICON_VERSIONING_BAND_HEIGHT_PERCENTAGE',
|
45
|
-
description: 'The percentage of the text band height relative to the image\'s height. A float number between 0 and 1',
|
46
|
-
default_value: 0.5,
|
47
|
-
verify_block: proc do |value|
|
48
|
-
UI.user_error!('Band height percentage is less than 0') if value < 0
|
49
|
-
UI.user_error!('Band height percentage is greater than 1') if value > 1
|
50
|
-
end,
|
51
|
-
optional: true,
|
52
|
-
type: Float
|
53
|
-
),
|
54
|
-
FastlaneCore::ConfigItem.new(
|
55
|
-
key: :band_blur_radius_percentage,
|
56
|
-
env_name: 'ICON_VERSIONING_BAND_BLUR_RADIUS_PERCENTAGE',
|
57
|
-
description: 'The blur radius percentage of the text band. The default value behaves like an automatic setting which produces the best results. More details: http://www.imagemagick.org/Usage/blur/#blur_args',
|
58
|
-
default_value: 0,
|
59
|
-
verify_block: proc do |value|
|
60
|
-
UI.user_error!('Band blur radius percentage is less than 0') if value < 0
|
61
|
-
end,
|
62
|
-
optional: true,
|
63
|
-
type: Float
|
64
|
-
),
|
65
|
-
FastlaneCore::ConfigItem.new(
|
66
|
-
key: :band_blur_sigma_percentage,
|
67
|
-
env_name: 'ICON_VERSIONING_BAND_BLUR_SIGMA_PERCENTAGE',
|
68
|
-
description: 'The blur sigma percentage of the text band. More details: http://www.imagemagick.org/Usage/blur/#blur_args',
|
69
|
-
default_value: 0.05,
|
70
|
-
verify_block: proc do |value|
|
71
|
-
UI.user_error!('Band blur sigma percentage is less than 0') if value < 0
|
72
|
-
UI.user_error!('Band blur sigma percentage is greater than 65355') if value > 65_355
|
73
|
-
end,
|
74
|
-
optional: true,
|
75
|
-
type: Float
|
76
|
-
),
|
77
|
-
FastlaneCore::ConfigItem.new(
|
78
|
-
key: :ignored_icons_regex,
|
79
|
-
env_name: 'ICON_VERSIONING_IGNORED_ICONS_REGEX',
|
80
|
-
description: 'An optional regex that causes the icons that match agains it not to be versioned',
|
81
|
-
optional: true,
|
82
|
-
type: Regexp
|
83
|
-
)
|
84
|
-
]
|
85
|
-
end
|
86
|
-
|
87
|
-
def self.is_supported?(platform)
|
88
|
-
[:ios].include?(platform)
|
17
|
+
def self.deprecated_notes
|
18
|
+
'Please use the `version_icon` action instead.'
|
89
19
|
end
|
90
20
|
end
|
91
21
|
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/version_icon_helper'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
class VersionIconAction < Action
|
7
|
+
def self.run(params)
|
8
|
+
version_icon_helper = Helper::VersionIconHelper.new(params)
|
9
|
+
|
10
|
+
return version_icon_helper.run()
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.description
|
14
|
+
'Overlay build information on top of your app icon. Based on original work by Krzysztof Zabłocki (https://github.com/krzysztofzablocki/Bootstrap).'
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.authors
|
18
|
+
['Iulian Onofrei', 'Krzysztof Zabłocki']
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.available_options
|
22
|
+
[
|
23
|
+
FastlaneCore::ConfigItem.new(
|
24
|
+
key: :appiconset_path,
|
25
|
+
env_name: 'VERSION_ICON_APPICONSET_PATH',
|
26
|
+
description: 'The path to the `.appiconset` directory containing the icon images',
|
27
|
+
verify_block: proc do |value|
|
28
|
+
path = File.expand_path(value.to_s)
|
29
|
+
|
30
|
+
UI.user_error!('Appiconset not found') unless File.exist?(path)
|
31
|
+
UI.user_error!('Appiconset is not a directory') unless File.directory?(path)
|
32
|
+
UI.user_error!('Appiconset does not end with .appiconset') unless path.end_with?('.appiconset')
|
33
|
+
end,
|
34
|
+
type: String
|
35
|
+
),
|
36
|
+
FastlaneCore::ConfigItem.new(
|
37
|
+
key: :text,
|
38
|
+
env_name: 'VERSION_ICON_TEXT',
|
39
|
+
description: 'The text to overlay over the icon images',
|
40
|
+
type: String
|
41
|
+
),
|
42
|
+
FastlaneCore::ConfigItem.new(
|
43
|
+
key: :band_height_percentage,
|
44
|
+
env_name: 'VERSION_ICON_BAND_HEIGHT_PERCENTAGE',
|
45
|
+
description: 'The percentage of the text band height relative to the image\'s height. A float number between 0 and 1',
|
46
|
+
default_value: 0.5,
|
47
|
+
verify_block: proc do |value|
|
48
|
+
UI.user_error!('Band height percentage is less than 0') if value < 0
|
49
|
+
UI.user_error!('Band height percentage is greater than 1') if value > 1
|
50
|
+
end,
|
51
|
+
optional: true,
|
52
|
+
type: Float
|
53
|
+
),
|
54
|
+
FastlaneCore::ConfigItem.new(
|
55
|
+
key: :band_blur_radius_percentage,
|
56
|
+
env_name: 'VERSION_ICON_BAND_BLUR_RADIUS_PERCENTAGE',
|
57
|
+
description: 'The blur radius percentage of the text band. The default value behaves like an automatic setting which produces the best results. More details: http://www.imagemagick.org/Usage/blur/#blur_args',
|
58
|
+
default_value: 0,
|
59
|
+
verify_block: proc do |value|
|
60
|
+
UI.user_error!('Band blur radius percentage is less than 0') if value < 0
|
61
|
+
end,
|
62
|
+
optional: true,
|
63
|
+
type: Float
|
64
|
+
),
|
65
|
+
FastlaneCore::ConfigItem.new(
|
66
|
+
key: :band_blur_sigma_percentage,
|
67
|
+
env_name: 'VERSION_ICON_BAND_BLUR_SIGMA_PERCENTAGE',
|
68
|
+
description: 'The blur sigma percentage of the text band. More details: http://www.imagemagick.org/Usage/blur/#blur_args',
|
69
|
+
default_value: 0.05,
|
70
|
+
verify_block: proc do |value|
|
71
|
+
UI.user_error!('Band blur sigma percentage is less than 0') if value < 0
|
72
|
+
UI.user_error!('Band blur sigma percentage is greater than 65355') if value > 65_355
|
73
|
+
end,
|
74
|
+
optional: true,
|
75
|
+
type: Float
|
76
|
+
),
|
77
|
+
FastlaneCore::ConfigItem.new(
|
78
|
+
key: :ignored_icons_regex,
|
79
|
+
env_name: 'VERSION_ICON_IGNORED_ICONS_REGEX',
|
80
|
+
description: 'An optional regex that causes the icons that match agains it not to be versioned',
|
81
|
+
optional: true,
|
82
|
+
type: Regexp
|
83
|
+
)
|
84
|
+
]
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.is_supported?(platform)
|
88
|
+
[:ios].include?(platform)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
data/lib/fastlane/plugin/icon_versioning/helper/{icon_versioning_helper.rb → version_icon_helper.rb}
RENAMED
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
UI = FastlaneCore::UI unless Fastlane.const_defined?('UI')
|
10
10
|
|
11
11
|
module Helper
|
12
|
-
class
|
12
|
+
class VersionIconHelper
|
13
13
|
CACHE_FILE_NAME = 'cache.yml'.freeze
|
14
14
|
|
15
15
|
attr_accessor :appiconset_path
|
@@ -80,7 +80,9 @@ module Fastlane
|
|
80
80
|
return path.gsub(/([^.]+)(\.appiconset)/, '\1-Versioned\2')
|
81
81
|
end
|
82
82
|
|
83
|
-
private
|
83
|
+
private
|
84
|
+
|
85
|
+
def version_icon(original_icon_path, versioned_icon_path)
|
84
86
|
image = MiniMagick::Image.open(original_icon_path)
|
85
87
|
|
86
88
|
width = image[:width]
|
@@ -154,7 +156,7 @@ module Fastlane
|
|
154
156
|
File.delete(text_base_icon_path, text_icon_path, temp_icon_path)
|
155
157
|
end
|
156
158
|
|
157
|
-
|
159
|
+
def suffix(path, text)
|
158
160
|
extension = File.extname(path)
|
159
161
|
|
160
162
|
return path.gsub(extension, "_#{text}#{extension}")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-icon_versioning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Iulian Onofrei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|
@@ -174,7 +174,8 @@ files:
|
|
174
174
|
- README.md
|
175
175
|
- lib/fastlane/plugin/icon_versioning.rb
|
176
176
|
- lib/fastlane/plugin/icon_versioning/actions/icon_versioning_action.rb
|
177
|
-
- lib/fastlane/plugin/icon_versioning/
|
177
|
+
- lib/fastlane/plugin/icon_versioning/actions/version_icon_action.rb
|
178
|
+
- lib/fastlane/plugin/icon_versioning/helper/version_icon_helper.rb
|
178
179
|
- lib/fastlane/plugin/icon_versioning/version.rb
|
179
180
|
homepage: https://github.com/revolter/fastlane-plugin-icon_versioning
|
180
181
|
licenses:
|
@@ -196,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
197
|
version: '0'
|
197
198
|
requirements: []
|
198
199
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.
|
200
|
+
rubygems_version: 2.6.13
|
200
201
|
signing_key:
|
201
202
|
specification_version: 4
|
202
203
|
summary: Overlay build information on top of your app icon
|