pod_updater 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +29 -32
- data/bin/pod_updater +1 -1
- data/lib/pod_updater/cp_podspec.rb +1 -1
- data/lib/pod_updater/git_tag_flow.rb +0 -1
- data/lib/pod_updater/modify_podspec.rb +0 -8
- data/lib/pod_updater/pod_push.rb +1 -2
- data/lib/pod_updater/pod_updater_file.rb +1 -2
- data/lib/pod_updater/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cbece51a322c3f8e7156fc603a84e3cd5da130c
|
4
|
+
data.tar.gz: d2637f413f52c557c79cd1a40977f972729ccc7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b11ad00c98d40f4815ee516f5e2eae8fa25efc03194feeebeba04d6727bd21a63b134408def07ab63a4249bfe2dd2d75e5ec60240bb348acdd8b6338ca4f910e
|
7
|
+
data.tar.gz: d189194f1f7f8e64df16689f44376b9ac0dc10456fad4446d62f7dcf9bc59796217e18402003b6ea3292a525eeefb0ca92229fc661d724eacd31b302e1fb554d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,40 +4,31 @@
|
|
4
4
|
|
5
5
|
# PodUpdater
|
6
6
|
|
7
|
-
iOS开发中帮助您快速的将自己的开发的pod库代码上传到git,并帮你push到podspec repo库去
|
8
|
-
使用方式:cd到你的pod库代码目录,然后执行'pod_updater -v [new_version]'
|
7
|
+
iOS 开发中帮助您快速的将自己的开发的pod库代码上传到 git ,并帮你 push 到 podspec repo 库去
|
8
|
+
使用方式: cd 到你的 pod 库代码目录,然后执行'pod_updater -v [new_version]',然后就可以去喝杯茶了
|
9
9
|
|
10
|
-
##
|
10
|
+
## 如何安装
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
```ruby
|
15
|
-
gem 'pod_updater'
|
16
|
-
```
|
17
|
-
|
18
|
-
And then execute:
|
19
|
-
|
20
|
-
$ bundle
|
21
|
-
|
22
|
-
Or install it yourself as:
|
12
|
+
在 shell 输入下面命令
|
23
13
|
|
24
14
|
$ gem install pod_updater
|
25
15
|
|
26
|
-
##
|
16
|
+
## 使用
|
27
17
|
|
28
|
-
cd
|
18
|
+
cd 到你的 podspec 所在的目录路径,如:
|
29
19
|
|
30
20
|
```
|
31
|
-
|
21
|
+
|
22
|
+
cd ~/Desktop/my_private_pod/my_first_pod
|
32
23
|
|
33
24
|
```
|
34
|
-
|
25
|
+
然后输入下面命令:
|
35
26
|
|
36
27
|
```
|
37
|
-
|
28
|
+
pod_updater -v 1.0.1
|
38
29
|
```
|
39
30
|
|
40
|
-
|
31
|
+
下面是一些我在使用时,shell里输入的命令
|
41
32
|
|
42
33
|
```
|
43
34
|
qwkdeMacBook-Pro-2:~ qwk$ cd ~/Documents/WZ_GitHub/WZ_HelloKit
|
@@ -46,23 +37,29 @@ qwkdeMacBook-Pro-2:WZ_HelloKit qwk$ pod_updater -v 3.0.0
|
|
46
37
|
|
47
38
|
```
|
48
39
|
|
40
|
+
## 更新记录
|
41
|
+
1. 添加 '-c' 命令,如果你需要将新版本对应的podspec文件拷贝到其他目录进行备份,可以使用该命令。如:
|
49
42
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
43
|
+
```
|
44
|
+
qwkdeMacBook-Pro-2:WZ_HelloKit qwk$ pod_updater -v 3.0.0 -c 备份目录
|
45
|
+
```
|
46
|
+
|
47
|
+
2. 添加podUpdater 文件来指定一个或者多个备份目录。使用方式,在pod项目的当前路径新建podUpdater文件,然后文件里添加内容:
|
48
|
+
|
49
|
+
```
|
50
|
+
"path", "备份目录路径1"
|
51
|
+
"path", "备份目录路径1"
|
52
|
+
```
|
53
|
+
这样在使用:
|
54
|
+
|
55
|
+
```
|
56
|
+
qwkdeMacBook-Pro-2:WZ_HelloKit qwk$ pod_updater -v 3.0.0
|
57
|
+
```
|
58
|
+
命令时,会自动从当前目录读取 podUpdater 文件里的路径,并将 podspec 文件依次拷贝过去。可参考[例子](https://github.com/hwzss/WZ_HelloKit/blob/master/podUpdater)
|
60
59
|
## License
|
61
60
|
|
62
61
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
63
62
|
|
64
|
-
## Code of Conduct
|
65
63
|
|
66
|
-
Everyone interacting in the PodUpdater project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/pod_updater/blob/master/CODE_OF_CONDUCT.md).
|
67
64
|
|
68
65
|
|
data/bin/pod_updater
CHANGED
@@ -9,7 +9,7 @@ require 'optparse'
|
|
9
9
|
options = {}
|
10
10
|
option_parser = OptionParser.new do |opts|
|
11
11
|
|
12
|
-
opts.banner = 'here is help messages of the command line tool for pod_updater'
|
12
|
+
opts.banner = 'here is help messages of the command line tool for \'pod_updater\''
|
13
13
|
|
14
14
|
options[:version] = nil
|
15
15
|
opts.on('-v', '--version [version]', String, 'the podspec\'s new version') do |version|
|
@@ -13,11 +13,6 @@ module PodUpdater
|
|
13
13
|
UI.msg "version:#{version}的格式不对"
|
14
14
|
return
|
15
15
|
end
|
16
|
-
|
17
|
-
# DEBUG:这里写死了路径是为了方便调试,正式用的话需去掉
|
18
|
-
# path = "/Users/qwkj/Documents/WZ_GitHub/Ruby_Learning/day_7/QW_Http.podspec"
|
19
|
-
# END
|
20
|
-
|
21
16
|
unless File.exist?path
|
22
17
|
UI.err "路径不存在"
|
23
18
|
return
|
@@ -29,8 +24,6 @@ module PodUpdater
|
|
29
24
|
f.each_line do |line|
|
30
25
|
# puts "#{line}"
|
31
26
|
if line.to_s =~ /s\.version\s*=\s*"(\d{1,}.\d.\d|\d{1,}.\d|\d{1,})"/
|
32
|
-
# puts "匹配到了"
|
33
|
-
temp = $1.to_s
|
34
27
|
line = line.sub(/\d{1,}.\d.\d|\d{1,}.\d|\d{1,}/) do |match|
|
35
28
|
version.to_s
|
36
29
|
end
|
@@ -46,7 +39,6 @@ module PodUpdater
|
|
46
39
|
# 找到指定路径下的podspec文件名
|
47
40
|
def pathWithPodspecSuffix(path)
|
48
41
|
|
49
|
-
# path = "/Users/qwkj/Desktop/IOS_Pod_Spec_Repo/千网PodRepo/QWCrashReporter/1.0.8/"
|
50
42
|
path = File.expand_path(path)
|
51
43
|
return nil unless File.exist?(path)
|
52
44
|
|
data/lib/pod_updater/pod_push.rb
CHANGED
@@ -23,8 +23,7 @@ class PodUpdaterFile
|
|
23
23
|
unless _path =~ /\/podUpdater$/
|
24
24
|
if File.directory?(_path)
|
25
25
|
pod_updater_paths = Dir.glob("#{_path}/podUpdater")
|
26
|
-
if pod_updater_paths.length == 0
|
27
|
-
# UI.err "无法找到podUpdater文件"
|
26
|
+
if pod_updater_paths.length == 0
|
28
27
|
pod_updater_path = nil
|
29
28
|
elsif pod_updater_paths.length == 1
|
30
29
|
pod_updater_path = pod_updater_paths.first
|
data/lib/pod_updater/version.rb
CHANGED