cocoapods-soul-component-plugin 0.0.1 → 0.0.7
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: 538e901040b541fa4e0ea1cbf57988925e52d826a5d58ad4ca2ed48b0974f557
|
4
|
+
data.tar.gz: ee18ce9056fc63b06c87a667256f11adab50ab28430a8f616f77892ec75773e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 126f0255c192ff5c9f3ae04855fa50745afe7b85a7d228335789dafb42c6031b30eae548610e4b143aeb1559981fe613d18edd7b003de696e7e2d52063c3eb2c
|
7
|
+
data.tar.gz: f7d5606e61d8a3525faa18bb02afe312ccfa80dc81b7b0fa12732331d204b717c39e9642d668aa83243a500966a0afd2c5497b694dc17b90e732d5d8501f4f23
|
@@ -3,6 +3,7 @@ require 'fileutils'
|
|
3
3
|
require 'json'
|
4
4
|
require 'xcodeproj'
|
5
5
|
require 'cocoapods-downloader'
|
6
|
+
require_relative '../gem_version'
|
6
7
|
|
7
8
|
module Pod
|
8
9
|
class Command
|
@@ -50,11 +51,11 @@ module CocoapodsSoulComponentPlugin
|
|
50
51
|
end
|
51
52
|
|
52
53
|
def self.podfile_path
|
53
|
-
root_path
|
54
|
+
"#{root_path}/Podfile"
|
54
55
|
end
|
55
56
|
|
56
57
|
def self.component_file_path
|
57
|
-
root_path
|
58
|
+
"#{root_path}/devops/component.json"
|
58
59
|
end
|
59
60
|
|
60
61
|
Pod::HooksManager.register('cocoapods-soul-component-plugin', :pre_install) do |_context|
|
@@ -68,15 +69,13 @@ module CocoapodsSoulComponentPlugin
|
|
68
69
|
end
|
69
70
|
|
70
71
|
def self.post_run
|
71
|
-
return if use_components == false
|
72
|
-
|
73
72
|
Pod::UI.puts '添加component.json文件引用'
|
74
73
|
project = Xcodeproj::Project.open(Pod::Config.instance.sandbox.project_path)
|
75
74
|
# 获取主group
|
76
75
|
group = project.main_group
|
77
76
|
group.set_source_tree('SOURCE_ROOT')
|
78
77
|
# 向group中添加 文件引用
|
79
|
-
file_ref = group.new_reference(
|
78
|
+
file_ref = group.new_reference(self.component_file_path)
|
80
79
|
# podfile_local排序
|
81
80
|
podfile_local_group = group.children.last
|
82
81
|
group.children.pop
|
@@ -85,8 +84,7 @@ module CocoapodsSoulComponentPlugin
|
|
85
84
|
end
|
86
85
|
|
87
86
|
def self.pre_run
|
88
|
-
|
89
|
-
|
87
|
+
puts "当前版本:#{CocoapodsSoulComponentPlugin::VERSION}"
|
90
88
|
json = File.read(self.component_file_path)
|
91
89
|
obj = JSON.parse(json)
|
92
90
|
dependencies = obj['dependencies']
|
@@ -99,8 +97,16 @@ module CocoapodsSoulComponentPlugin
|
|
99
97
|
if each.path == nil
|
100
98
|
if each.submodule == false
|
101
99
|
if each.local == true
|
102
|
-
local_path = each.name
|
103
|
-
|
100
|
+
local_path = each.name
|
101
|
+
if each.branch != nil
|
102
|
+
local_path += '-'
|
103
|
+
local_path += each.branch.to_s.tr('/','-')
|
104
|
+
end
|
105
|
+
if each.commit != nil
|
106
|
+
local_path += '-'
|
107
|
+
local_path += each.commit.to_s
|
108
|
+
end
|
109
|
+
target_path = "#{root_path}/LocalPods/#{local_path}"
|
104
110
|
each.path = target_path
|
105
111
|
|
106
112
|
if File.exist?(target_path) == false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-soul-component-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|