fastlane-plugin-icon_versioning 1.3.1 → 1.4.0

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
  SHA256:
3
- metadata.gz: b016bc641b4e5e1b75a32034f61e92444d9aa6090f6c24b95234837cc2d02559
4
- data.tar.gz: 4d822743cb86c831279d867868227ce9001522e32d9bb3b2670d7fff28433cb4
3
+ metadata.gz: 04b3a71b5173e2096cdb92088e148ccb69526bf464d5616583c6d3f85d42bd02
4
+ data.tar.gz: 35983b790c8ec6517d343752214d66cdfd8fcff6f4d7b0b659a587365f93610e
5
5
  SHA512:
6
- metadata.gz: a3f58274169c50bc1d0d9507adf1e199ad3f2d900cb177621a0259902cc9e6899930b7fa685f76670d73e89db2071a8839a06272dd5e3a25b26ee8212966333b
7
- data.tar.gz: 73f1c26773e708e6ce78be9ac2d50c0bd562aa871b8199eca6908eea7076ceca4a3f29ba96e5f4500d709ebdf3a355d0c840b0d715f310d85d75a925c0859fd2
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)/, '\1-Versioned\2')
85
+ def self.get_versioned_path(path, suffix)
86
+ return path.gsub(/([^.]+)(\.appiconset)/, "\\1-#{suffix}\\2")
86
87
  end
87
88
 
88
89
  private
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module IconVersioning
3
- VERSION = '1.3.1'
3
+ VERSION = '1.4.0'
4
4
  end
5
5
  end
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.3.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: 2019-09-09 00:00:00.000000000 Z
11
+ date: 2021-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick