fastlane-plugin-rearchive 1.0.0 → 1.0.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/rearchive/actions/iconset_action.rb +25 -20
- data/lib/fastlane/plugin/rearchive/actions/replace_file_action.rb +1 -1
- data/lib/fastlane/plugin/rearchive/helper/archives/xc_archive.rb +1 -1
- data/lib/fastlane/plugin/rearchive/helper/plist_buddy.rb +25 -10
- data/lib/fastlane/plugin/rearchive/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44be78fb0a8c6a4b9b242982bfdee6565f0364b7270e315a5e8ba1b169b381e5
|
4
|
+
data.tar.gz: d3a74cb2dd63087745701fd24c30f70cbd803dfe148f717b681cf4da84f871b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fa3dd5bc15991fb1962119702e3f37041b2bad51880eca6c82ec2a2f09a76c644194419de0e840289fda08af825589a4f9cf38cf771708b0d640e22abd06667
|
7
|
+
data.tar.gz: 5bc6cbe61d686e94929da013a27d69945f725fa301ab6c27e68010d6b5a7a0cf9f8566366e27281d0a11c47be7f36ca22ad8e25715b733f8dd705792f4968d84
|
@@ -32,9 +32,11 @@ module Fastlane
|
|
32
32
|
archive.delete(archive.app_path(path))
|
33
33
|
end
|
34
34
|
end
|
35
|
-
|
36
|
-
|
35
|
+
rescue RuntimeError => e
|
36
|
+
FastlaneCore::UI.message(e)
|
37
37
|
next
|
38
|
+
end.each do |(icon_files_key, _)|
|
39
|
+
plist_buddy.exec("Delete #{icon_files_key}")
|
38
40
|
end
|
39
41
|
JSON.parse(File.read(iconset_manifest_path))["images"].select do |image|
|
40
42
|
image["filename"]
|
@@ -54,34 +56,37 @@ module Fastlane
|
|
54
56
|
idiom_suffix = idiom == "iphone" ? "" : "~#{idiom}"
|
55
57
|
icons_plist_key = ":CFBundleIcons#{idiom_suffix}:CFBundlePrimaryIcon:CFBundleIconFiles"
|
56
58
|
plist_buddy.exec("Add #{icons_plist_key} array")
|
57
|
-
icons.each do |
|
58
|
-
relative_path = archive.app_path((
|
59
|
+
icons.each do |icon|
|
60
|
+
relative_path = archive.app_path((icon[:target]).to_s)
|
59
61
|
local_path = archive.local_path(relative_path)
|
60
|
-
|
62
|
+
FastlaneCore::UI.message("Copy icon from #{icon[:source].shellescape} to #{local_path.shellescape}")
|
63
|
+
system("cp #{icon[:source].shellescape} #{local_path.shellescape}", exception: true)
|
61
64
|
archive.replace(relative_path)
|
62
|
-
end
|
63
|
-
|
64
|
-
|
65
|
+
end.map do |icon|
|
66
|
+
icon[:name]
|
67
|
+
end.uniq.each do |key|
|
68
|
+
plist_buddy.exec("Add #{icons_plist_key}: string #{key}")
|
65
69
|
end
|
66
70
|
end
|
67
71
|
Dir.mktmpdir do |dir|
|
68
72
|
Dir.chdir(dir) do
|
73
|
+
FastlaneCore::UI.message("Current Directory: #{dir}")
|
74
|
+
FastlaneCore::UI.message("Iconset: #{iconset_path}")
|
69
75
|
IO.popen(%W[
|
70
|
-
|
71
|
-
--output-format
|
76
|
+
/usr/bin/actool
|
77
|
+
--output-format human-readable-text
|
72
78
|
--notices
|
73
79
|
--warnings
|
74
|
-
--output-partial-info-plist
|
75
|
-
--app-icon
|
80
|
+
--output-partial-info-plist assetcatalog_generated_info.plist
|
81
|
+
--app-icon #{File.basename(iconset_path, ".appiconset")}
|
76
82
|
--compress-pngs
|
77
|
-
--enable-on-demand-resources
|
78
|
-
--sticker-pack-identifier-prefix
|
79
|
-
--
|
80
|
-
--target-device
|
81
|
-
--target
|
82
|
-
--
|
83
|
-
--
|
84
|
-
--product-type=com.apple.product-type.application
|
83
|
+
--enable-on-demand-resources YES
|
84
|
+
--sticker-pack-identifier-prefix #{plist_buddy.exec("Print CFBundleIdentifier")}.sticker-pack.
|
85
|
+
--target-device iphone
|
86
|
+
--target-device ipad
|
87
|
+
--minimum-deployment-target #{plist_buddy.exec("Print MinimumOSVersion")}
|
88
|
+
--platform iphoneos
|
89
|
+
--product-type com.apple.product-type.application
|
85
90
|
--compile
|
86
91
|
.
|
87
92
|
#{File.dirname(iconset_path)}
|
@@ -41,7 +41,7 @@ module Fastlane
|
|
41
41
|
|
42
42
|
def self.extract_app_path(archive_path)
|
43
43
|
plist_buddy = PlistBuddy.new("#{archive_path}/Info.plist")
|
44
|
-
plist_buddy.exec("Print :ApplicationProperties:ApplicationPath")
|
44
|
+
plist_buddy.exec("Print :ApplicationProperties:ApplicationPath")
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
|
10
10
|
def exec(command)
|
11
11
|
FastlaneCore::UI.verbose("/usr/libexec/PlistBuddy -c \"#{command}\" \"#{@plist_path}\"")
|
12
|
-
result = IO.popen("/usr/libexec/PlistBuddy -c \"#{command}\" \"#{@plist_path}\"", &:read).
|
12
|
+
result = IO.popen("/usr/libexec/PlistBuddy -c \"#{command}\" \"#{@plist_path}\"", &:read).gsub(/\A\s*"?|"?\s*\z/m, "")
|
13
13
|
|
14
14
|
if $?.exitstatus.nonzero?
|
15
15
|
FastlaneCore::UI.important("PlistBuddy command failed: #{result}")
|
@@ -26,11 +26,20 @@ module Fastlane
|
|
26
26
|
|
27
27
|
result_lines = result.lines.map(&:chop)
|
28
28
|
|
29
|
-
|
29
|
+
case RUBY_PLATFORM
|
30
|
+
when "x86_64-linux", "aarch64-linux-gnu"
|
31
|
+
raise "value is not an array (#{RUBY_PLATFORM}): #{result_lines}" unless result_lines.first == "("
|
30
32
|
|
31
|
-
|
33
|
+
result_lines.drop(1).take(result_lines.size - 2).map do |line|
|
34
|
+
line[1..line.size].sub(/,$/, "")
|
35
|
+
end
|
36
|
+
else
|
37
|
+
raise "value is not an array (#{RUBY_PLATFORM}): #{result_lines}" unless result_lines.first == "Array {"
|
32
38
|
|
33
|
-
|
39
|
+
result_lines.drop(1).take(result_lines.size - 2).map do |line|
|
40
|
+
line[4..line.size]
|
41
|
+
end
|
42
|
+
end
|
34
43
|
end
|
35
44
|
|
36
45
|
def parse_dict_keys(entry)
|
@@ -38,14 +47,20 @@ module Fastlane
|
|
38
47
|
|
39
48
|
result_lines = entry.lines.map(&:chop)
|
40
49
|
|
41
|
-
|
50
|
+
case RUBY_PLATFORM
|
51
|
+
when "x86_64-linux", "aarch64-linux-gnu"
|
52
|
+
raise "value is not an dict (#{RUBY_PLATFORM}): #{result_lines}" unless result_lines.first == "{"
|
42
53
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
54
|
+
result_lines.map do |line|
|
55
|
+
line.match(/(?<=^\t)[^\s}]+/)
|
56
|
+
end
|
57
|
+
else
|
58
|
+
raise "value is not an dict (#{RUBY_PLATFORM}): #{result_lines}" unless result_lines.first == "Dict {"
|
47
59
|
|
48
|
-
|
60
|
+
result_lines.map do |line|
|
61
|
+
line.match(/(?<=^\s{4})[^\s}]+/)
|
62
|
+
end
|
63
|
+
end.compact.map(&:to_s)
|
49
64
|
end
|
50
65
|
end
|
51
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-rearchive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- naoigcat
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bundler
|
@@ -150,7 +149,6 @@ dependencies:
|
|
150
149
|
- - ">="
|
151
150
|
- !ruby/object:Gem::Version
|
152
151
|
version: '0'
|
153
|
-
description:
|
154
152
|
email: 17925623+naoigcat@users.noreply.github.com
|
155
153
|
executables: []
|
156
154
|
extensions: []
|
@@ -172,7 +170,6 @@ homepage: https://github.com/naoigcat/fastlane-plugin-rearchive
|
|
172
170
|
licenses:
|
173
171
|
- MIT
|
174
172
|
metadata: {}
|
175
|
-
post_install_message:
|
176
173
|
rdoc_options: []
|
177
174
|
require_paths:
|
178
175
|
- lib
|
@@ -187,8 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
184
|
- !ruby/object:Gem::Version
|
188
185
|
version: '0'
|
189
186
|
requirements: []
|
190
|
-
rubygems_version: 3.
|
191
|
-
signing_key:
|
187
|
+
rubygems_version: 3.6.3
|
192
188
|
specification_version: 4
|
193
189
|
summary: Modify files inside ipa/xcarchive for publishing multiple configurations
|
194
190
|
without rearchiving.
|