fastlane-plugin-icon_versioning 1.3.1 → 1.4.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04b3a71b5173e2096cdb92088e148ccb69526bf464d5616583c6d3f85d42bd02
|
|
4
|
+
data.tar.gz: 35983b790c8ec6517d343752214d66cdfd8fcff6f4d7b0b659a587365f93610e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6571cdb8c6134c64b1abea3e8a198449ff4e8a2c3ba2c03fc5f9583d08720e5fbc7550ec1d4e9717360ab0c4ae1df41da63d59475c4337c10d0bafdbd84aa2a
|
|
7
|
+
data.tar.gz: 3ead798ca60dc50985ed8dfc0394e806a7778bdc09837d62fffe6125d958baacde0162aa411be66e86b5c73bc2efde9a5059f1ee5966e3350e8ecb5824a3da95
|
|
@@ -33,6 +33,14 @@ module Fastlane
|
|
|
33
33
|
end,
|
|
34
34
|
type: String
|
|
35
35
|
),
|
|
36
|
+
FastlaneCore::ConfigItem.new(
|
|
37
|
+
key: :versioned_appiconset_suffix,
|
|
38
|
+
env_name: 'VERSION_ICON_VERSIONED_APPICONSET_SUFFIX',
|
|
39
|
+
description: 'The suffix for the versioned `.appiconset` directory',
|
|
40
|
+
default_value: 'Versioned',
|
|
41
|
+
optional: true,
|
|
42
|
+
type: String
|
|
43
|
+
),
|
|
36
44
|
FastlaneCore::ConfigItem.new(
|
|
37
45
|
key: :text,
|
|
38
46
|
env_name: 'VERSION_ICON_TEXT',
|
|
@@ -15,6 +15,7 @@ module Fastlane
|
|
|
15
15
|
|
|
16
16
|
def initialize(params)
|
|
17
17
|
@appiconset_path = File.expand_path(params[:appiconset_path])
|
|
18
|
+
@versioned_appiconset_suffix = params[:versioned_appiconset_suffix]
|
|
18
19
|
@text = params[:text]
|
|
19
20
|
@text_color = params[:text_color]
|
|
20
21
|
|
|
@@ -36,7 +37,7 @@ module Fastlane
|
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
def run()
|
|
39
|
-
versioned_appiconset_path = self.class.get_versioned_path(@appiconset_path)
|
|
40
|
+
versioned_appiconset_path = self.class.get_versioned_path(@appiconset_path, @versioned_appiconset_suffix)
|
|
40
41
|
|
|
41
42
|
Dir.mkdir(versioned_appiconset_path) unless Dir.exist?(versioned_appiconset_path)
|
|
42
43
|
|
|
@@ -51,7 +52,7 @@ module Fastlane
|
|
|
51
52
|
FileUtils.copy("#{@appiconset_path}/#{CONTENTS_JSON_FILE_NAME}", "#{versioned_appiconset_path}/#{CONTENTS_JSON_FILE_NAME}")
|
|
52
53
|
|
|
53
54
|
Dir.glob("#{@appiconset_path}/*.png").each do |original_icon_path|
|
|
54
|
-
versioned_icon_path = self.class.get_versioned_path(original_icon_path)
|
|
55
|
+
versioned_icon_path = self.class.get_versioned_path(original_icon_path, @versioned_appiconset_suffix)
|
|
55
56
|
|
|
56
57
|
text_sha = Digest::SHA2.hexdigest(@text)
|
|
57
58
|
|
|
@@ -81,8 +82,8 @@ module Fastlane
|
|
|
81
82
|
File.open(cache_file_path, 'w') { |file| file.write(cache.to_yaml) }
|
|
82
83
|
end
|
|
83
84
|
|
|
84
|
-
def self.get_versioned_path(path)
|
|
85
|
-
return path.gsub(/([^.]+)(\.appiconset)/,
|
|
85
|
+
def self.get_versioned_path(path, suffix)
|
|
86
|
+
return path.gsub(/([^.]+)(\.appiconset)/, "\\1-#{suffix}\\2")
|
|
86
87
|
end
|
|
87
88
|
|
|
88
89
|
private
|
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.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Iulian Onofrei
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mini_magick
|