fastlane-plugin-pod_spec_generator 0.1.0 → 0.1.1
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/cocoapods/pod_file_extension.rb +0 -4
- data/lib/fastlane/plugin/pod_spec_generator/actions/pod_file_generator_action.rb +19 -5
- data/lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb +9 -1
- data/lib/fastlane/plugin/pod_spec_generator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c8915eaf10d3bcd91de913542f42f246681f84553656797da5f67e9c2e4b57c9
|
|
4
|
+
data.tar.gz: 96442ee5fd4428f701066e87af37f3a948d0026e30363b486034ec8c642c3c65
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b452a337dde23046e100b3e4cd091c6a02f5782c3d595c0221fb4ab0d5709b2ec77cabc5dae8994dad6fb8dd0a14f08cf54a57440f5937b3688f884ea58b946
|
|
7
|
+
data.tar.gz: 81e66c10f5b5fb7c053610afabba27d0963479805263e99964b983941a5e4ecd100c5c4e76160a531381858995295f0e9f0154b72c427bc88c1a58de03def980
|
|
@@ -7,9 +7,15 @@ module Fastlane
|
|
|
7
7
|
|
|
8
8
|
def self.run(params)
|
|
9
9
|
builder = PodFileBuilder.new
|
|
10
|
-
builder.apply_local_spm_fix = params[:apply_local_spm_fix]
|
|
10
|
+
builder.apply_local_spm_fix = params[:apply_local_spm_fix]
|
|
11
11
|
builder.targets = params[:targets]
|
|
12
|
-
builder.use_frameworks = params[:use_frameworks]
|
|
12
|
+
builder.use_frameworks = params[:use_frameworks]
|
|
13
|
+
if params[:platform]
|
|
14
|
+
builder.platform = params[:platform].reduce([]) do |content, pair|
|
|
15
|
+
content += [":#{pair[0]}", pair[1]]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
13
19
|
output = builder.build_pod_file_string
|
|
14
20
|
File.write("#{params[:folder]}/Podfile", output)
|
|
15
21
|
|
|
@@ -36,13 +42,15 @@ module Fastlane
|
|
|
36
42
|
FastlaneCore::ConfigItem.new(key: :use_frameworks,
|
|
37
43
|
env_name: "POD_FILE_GENERATOR_VERSION",
|
|
38
44
|
description: "Version String",
|
|
45
|
+
type: TrueClass,
|
|
39
46
|
default_value: true,
|
|
40
47
|
optional: true),
|
|
41
48
|
FastlaneCore::ConfigItem.new(key: :apply_local_spm_fix,
|
|
42
49
|
env_name: "POD_LOCAL_SPM",
|
|
43
50
|
description: "Use local spm",
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
type: TrueClass,
|
|
52
|
+
default_value: false,
|
|
53
|
+
optional: true),
|
|
46
54
|
FastlaneCore::ConfigItem.new(key: :targets,
|
|
47
55
|
description: "Targets",
|
|
48
56
|
optional: false,
|
|
@@ -51,7 +59,13 @@ module Fastlane
|
|
|
51
59
|
env_name: "POD_FILE_GENERATOR_FOLDER",
|
|
52
60
|
description: "Folder for the file String",
|
|
53
61
|
optional: false,
|
|
54
|
-
type: String)
|
|
62
|
+
type: String),
|
|
63
|
+
FastlaneCore::ConfigItem.new(key: :platform,
|
|
64
|
+
env_name: "POD_FILE_GENERATOR_PLATFORM",
|
|
65
|
+
description: "Platform",
|
|
66
|
+
default_value: {ios: "14.0"},
|
|
67
|
+
optional: true,
|
|
68
|
+
type: Hash)
|
|
55
69
|
|
|
56
70
|
]
|
|
57
71
|
end
|
|
@@ -3,16 +3,19 @@
|
|
|
3
3
|
class PodFileBuilder
|
|
4
4
|
attr_writer :use_frameworks,
|
|
5
5
|
:targets,
|
|
6
|
-
:apply_local_spm_fix
|
|
6
|
+
:apply_local_spm_fix,
|
|
7
|
+
:platform
|
|
7
8
|
|
|
8
9
|
def initialize
|
|
9
10
|
@use_frameworks = true
|
|
10
11
|
@targets = []
|
|
11
12
|
@apply_local_spm_fix = false
|
|
13
|
+
@platform = nil
|
|
12
14
|
end
|
|
13
15
|
|
|
14
16
|
def build_pod_file_string
|
|
15
17
|
[use_frameworks_string,
|
|
18
|
+
platform,
|
|
16
19
|
apply_local_spm_fix_string,
|
|
17
20
|
targets_string,
|
|
18
21
|
].compact
|
|
@@ -27,6 +30,10 @@ class PodFileBuilder
|
|
|
27
30
|
end
|
|
28
31
|
end
|
|
29
32
|
|
|
33
|
+
def platform
|
|
34
|
+
return nil unless @platform
|
|
35
|
+
"platform #{@platform.join(", ")}"
|
|
36
|
+
end
|
|
30
37
|
def create_target_string(target)
|
|
31
38
|
start = "target '#{target[:name]}' do"
|
|
32
39
|
dependencies = target[:dependencies].map do |dependency|
|
|
@@ -42,6 +49,7 @@ class PodFileBuilder
|
|
|
42
49
|
|
|
43
50
|
def apply_local_spm_fix_string
|
|
44
51
|
return "plugin 'fastlane-plugin-pod_spec_generator'" if @apply_local_spm_fix
|
|
52
|
+
|
|
45
53
|
return nil
|
|
46
54
|
end
|
|
47
55
|
def use_frameworks_string
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-pod_spec_generator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Crowe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-05-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cocoapods
|