cocoapods-bb-PodAssistant 0.1.8 → 0.1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/lib/cocoapods-bb-PodAssistant/config/cache_path.rb +3 -1
- data/lib/cocoapods-bb-PodAssistant/config/source_manager.rb +1 -1
- data/lib/cocoapods-bb-PodAssistant/gem_version.rb +1 -1
- data/lib/cocoapods-bb-PodAssistant/helpers/pod_utils.rb +14 -7
- data/lib/cocoapods-bb-PodAssistant/helpers/stable_env_helper.rb +2 -2
- data/lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb +25 -12
- data/lib/cocoapods-bb-PodAssistant/podfile.rb +11 -2
- 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: f6c32b006b3836cba11f001d3ebc24c707f3bd473a35156cfaf3bceae50f4528
|
4
|
+
data.tar.gz: 447a74c6907306dfdacf90685572eeea587b97e0e20ad61c0ccebf7001f4ca69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0f45f73957e38a0007348067cbcbc39d65a1a533ffe0ba5a349d82134909f3e51bdc72e062adfcecc7b184ddc3da11df2cc2dd2041740331f6216ebe53a8a27
|
7
|
+
data.tar.gz: ea3629e578813651181a761037a0d4ec02a25b0003c6e24cca1574de0e1fd3b82a0e0ec0fc4f028b2e5fc91da44019c64e2eff3cecd80bab4cf44a1f7913a073
|
data/README.md
CHANGED
@@ -15,14 +15,26 @@ pod stable --help
|
|
15
15
|
|
16
16
|
* 初始化本地lock文件
|
17
17
|
```
|
18
|
-
pod stable
|
18
|
+
pod stable init
|
19
19
|
```
|
20
20
|
|
21
21
|
* 同步lock文件
|
22
22
|
```
|
23
|
-
pod stable
|
23
|
+
pod stable sync
|
24
24
|
```
|
25
25
|
|
26
|
+
* pod install
|
27
|
+
```
|
28
|
+
pod stable install
|
29
|
+
```
|
30
|
+
|
31
|
+
* pod update
|
32
|
+
```
|
33
|
+
pod stable update [组件名称] --sync
|
34
|
+
```
|
35
|
+
> `--sync`选项可选,会自动同步远端标签,不带默认不更新远端版本
|
36
|
+
更多用法,参照:pod stable update --help
|
37
|
+
|
26
38
|
## linkline使用
|
27
39
|
支持动态/静态库
|
28
40
|
|
@@ -8,7 +8,9 @@ module BB
|
|
8
8
|
stable_source = StableSource.stable_default_source
|
9
9
|
end
|
10
10
|
@stable_source = stable_source
|
11
|
-
|
11
|
+
if File.exist?(File.join(Pathname.pwd, "Podfile"))
|
12
|
+
@bundleId = BB::PodUtils.getProjectBundleIdentifier
|
13
|
+
end
|
12
14
|
if @bundleId.nil?
|
13
15
|
@bundleId = 'stable'
|
14
16
|
end
|
@@ -73,17 +73,24 @@ module BB
|
|
73
73
|
# 获取info配置文件路径
|
74
74
|
def self.getInfoPlistPath
|
75
75
|
path = File.join(getProjectPath, "bbframework/Resources/Info.plist")
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
if File.exist?(path)
|
77
|
+
return path
|
78
|
+
end
|
79
|
+
puts "无法找打工程Info.plist配置文件,工程目录:#{getProjectPath}".yellow
|
80
|
+
return nil
|
81
|
+
# raise Informative, "#{path} File no exist, please check" unless File.exist?(path)
|
82
|
+
# return path
|
79
83
|
end
|
80
84
|
# 获取info配置key对应的值
|
81
85
|
def self.getValueFromInfoPlist(key)
|
82
86
|
plistPath = getInfoPlistPath
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
+
if !plistPath.nil?
|
88
|
+
value = `/usr/libexec/PlistBuddy -c "Print #{key}" #{plistPath}`
|
89
|
+
value = value.rstrip()
|
90
|
+
puts "#{key} => #{value}"
|
91
|
+
return value
|
92
|
+
end
|
93
|
+
return ""
|
87
94
|
end
|
88
95
|
# 获取Xcode版本
|
89
96
|
def self.xcode_version
|
@@ -49,7 +49,7 @@ module BB
|
|
49
49
|
if verify_branch_exists
|
50
50
|
if stable_tag || stable_branch
|
51
51
|
if stable_branch
|
52
|
-
system "cd #{cachePath}; git checkout #{stable_branch}; git reset --hard origin/#{stable_branch}"
|
52
|
+
system "cd #{cachePath}; git checkout #{stable_branch}; git reset --hard origin/#{stable_branch}; git pull --all"
|
53
53
|
end
|
54
54
|
if stable_tag
|
55
55
|
system "cd #{cachePath}; git checkout #{stable_tag};"
|
@@ -57,7 +57,7 @@ module BB
|
|
57
57
|
else
|
58
58
|
result =`git symbolic-ref refs/remotes/origin/HEAD`
|
59
59
|
protechBranch = result.split("/").last.strip || default_branch
|
60
|
-
system "cd #{cachePath}; git checkout #{protechBranch}; git reset --hard origin/#{protechBranch}"
|
60
|
+
system "cd #{cachePath}; git checkout #{protechBranch}; git reset --hard origin/#{protechBranch}; git pull --all"
|
61
61
|
end
|
62
62
|
else
|
63
63
|
puts "❌ stable配置无效分支信息source:#{@stable_source} branch:#{stable_branch}".red
|
@@ -1,9 +1,11 @@
|
|
1
1
|
require 'cocoapods-bb-PodAssistant/config/stable_specs'
|
2
2
|
require 'cocoapods-bb-PodAssistant/helpers'
|
3
|
+
require 'cocoapods-bb-PodAssistant/helpers/stable_env_helper'
|
3
4
|
|
4
5
|
module BB
|
5
6
|
class StableManager
|
6
|
-
def initialize()
|
7
|
+
def initialize(env = nil)
|
8
|
+
@env = env
|
7
9
|
end
|
8
10
|
|
9
11
|
# podfile 更新配置文件使用(通用)
|
@@ -11,8 +13,16 @@ module BB
|
|
11
13
|
update_stable_lock(public_stable_yaml, pod_targets)
|
12
14
|
end
|
13
15
|
# podfile 更新配置文件使用(业务线)
|
14
|
-
def update_business_stable_lock(
|
15
|
-
|
16
|
+
def update_business_stable_lock(pod_targets)
|
17
|
+
if @env.nil?
|
18
|
+
@env = BB::StableEnv.new()
|
19
|
+
end
|
20
|
+
businessSpecName = @env.business_stable
|
21
|
+
if !businessSpecName.nil?
|
22
|
+
update_stable_lock(business_stable_yaml(businessSpecName), pod_targets)
|
23
|
+
else
|
24
|
+
puts "没有配置业务线公共源,请确认!!!".yellow
|
25
|
+
end
|
16
26
|
end
|
17
27
|
# podfile 更新配置文件使用(项目)
|
18
28
|
def update_product_stable_lock(pod_targets)
|
@@ -65,21 +75,24 @@ module BB
|
|
65
75
|
stableMgr.update_common_stable_lock(pod_targets)
|
66
76
|
end
|
67
77
|
# podfile 更新配置文件使用(业务线)
|
68
|
-
def self.updateBusinessStableLock(
|
78
|
+
def self.updateBusinessStableLock(pod_targets)
|
69
79
|
stableMgr = StableManager.new()
|
70
|
-
stableMgr.
|
80
|
+
stableMgr.update_business_stable_lock(pod_targets)
|
71
81
|
end
|
72
82
|
# 更新产品lock
|
73
83
|
def self.updateProductStableLock(pod_targets)
|
74
84
|
stableMgr = StableManager.new()
|
75
85
|
stableMgr.update_product_stable_lock(pod_targets)
|
76
86
|
end
|
87
|
+
# pod助手ruby文件路径
|
88
|
+
def self.pod_assistant_path()
|
89
|
+
stableMgr = StableManager.new()
|
90
|
+
return File.join(stableMgr.cachePath, "PodAssistant/PodAssistant.rb") #名称固定
|
91
|
+
end
|
92
|
+
# pod助手机器人ruby文件路径
|
93
|
+
def self.pod_assistant_robot_path()
|
94
|
+
stableMgr = StableManager.new()
|
95
|
+
return File.join(stableMgr.cachePath, "PodAssistant/robot.rb") #名称固定
|
96
|
+
end
|
77
97
|
end
|
78
|
-
|
79
|
-
# class << self
|
80
|
-
# def updateCommonStableLock(pod_targets)
|
81
|
-
# stableMgr = StableManager.new()
|
82
|
-
# stableMgr.update_common_stable_lock(pod_targets)
|
83
|
-
# end
|
84
|
-
# end
|
85
98
|
end
|
@@ -82,8 +82,17 @@ module Pod
|
|
82
82
|
BB::StableManager.updateCommonStableLock(installer.pod_targets)
|
83
83
|
end
|
84
84
|
# 更新业务公共lock
|
85
|
-
def update_business_stable_lock(
|
86
|
-
BB::StableManager.updateBusinessStableLock(
|
85
|
+
def update_business_stable_lock(installer)
|
86
|
+
BB::StableManager.updateBusinessStableLock(installer.pod_targets)
|
87
|
+
end
|
88
|
+
|
89
|
+
# pod助手ruby文件路径
|
90
|
+
def pod_assistant_path()
|
91
|
+
return BB::StableManager.pod_assistant_path
|
92
|
+
end
|
93
|
+
# pod助手机器人ruby文件路径
|
94
|
+
def pod_assistant_robot_path()
|
95
|
+
return BB::StableManager.pod_assistant_robot_path
|
87
96
|
end
|
88
97
|
|
89
98
|
# 从列表中搜索得到对应配置
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-bb-PodAssistant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- humin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods-core
|